Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Sat Jul 07, 2012 5:39 pm 
Offline
Newbie

Joined: Sat Jul 07, 2012 5:18 pm
Posts: 2
Perhaps they're too basic, but I've been rtfming all over the place, and maybe I'm retarded but I have some questions that don't seem to be very clearly answered.

I think I have this virtual named server stuff down, when I want to serve my static web urls it's pretty easy, I edit my whatever.com url in sites-available and point to my dir that is hosting these .coms I have up right now. my path is something like /blahblah/whatever.com/public_html/ and I just stick my index files etc into public_html. I've read that when creating django apps it's a bad idea to put your .py files in public_html since that makes them downloadable (obviously not a good idea). I know stuff has to be split up, but I'm not completely clear with how.

so let's say that I have a whatever.com domain that I want to use to host a django app, how should I split up my files? my guess would be to have templates and static files directly in /blahblah/www/whatever.com/public_html and have my django .py files hosted elsewhere, say /django/projects/whatever-project I know that I then need to go into my whatever.com file in /etc/apache2/sites-available and edit it to point apache to my .wsgi file and static files. What I'm not clear on is where I should put my .wsgi file. Does it need to hang out with /django/projects/whatever-project or does it need to be in /blahblah/www/whatever.com/ or /blahblah/www/whatever.com/public_html ?


The thing is, I can get these django projects working just fine with my local runserver, but I'm not terribly clear what the best way to implement them in my linode server is.

Any insights would be greatly appreciated. Thanks in advance!


Top
   
PostPosted: Sun Jul 08, 2012 6:17 am 
Offline
Senior Member

Joined: Fri Feb 18, 2005 4:09 pm
Posts: 594
I place my django files in my user home directory, allowing the www-data apache group to read the directories. I also allow www-data to write those directories, allowing .pyc files to be created, but this is not necessary and is hardly the performance problem I thought it might be when I originally set everything up.

For development I have a second www-dev apache group and separate directory in my user home directory, only localhost can see the django output from there (not externally visible) and I use virtualbox or nomachine for development. I can kill all www-dev owned processes and the main django site is untouched.

James


Top
   
PostPosted: Sun Jul 08, 2012 4:20 pm 
Offline
Newbie

Joined: Sat Jul 07, 2012 5:18 pm
Posts: 2
awesome, thanks!


I got the basics set up and serving, up next: learn about ssl.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group