On Oct 28, 4:59 am, "Adam D." <[EMAIL PROTECTED]> wrote:
> I am a newbie.
>
> Everywhere I read about django, it suggests to put your django project
> outside of your servers document root.
>
> My question is if my document root is '/var/www/vhosts/domain.com/
> doc_root' and I put my project outside of that root, at '/var/www/
> vhosts/domain.com/django_site' how do i link it to my 'doc_root', so
> when i go tohttp://www.domain.com, it serves my djano site?
>
> Basic stuff... Just can't find a definitive answer anywhere...
>
> Also, how would having the django code in your document_root, pose a
> security problem, if it is all server-side code? I come from a PHP
> background, so I am very used to just putting the entire site in the
> root.

You should not put your Django applications source code under the
document root because if the web site administrator stuffs up your web
server configuration, or it isn't configured properly in the first
place, then people can download your source code including possibly
any database login and password information.

The ultimate answer to your question depends on what web server you
are using and what hosting mechanism you are using to bridge to
Django.

Are you using Apache, lightpd, or nginx?

Are you using mod_python, mod_wsgi, CGI, FASTCGI, SCGI etc etc?

Also, are you only talking about linking in the media files, given
that they will be the only static files that the web server will
actually need to serve up itself?

Graham


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to