Ohh thanks. You have saved at least 4 hours of my sleep, 10 coffees and a very bad mood!
Am Mittwoch, 25. März 2015 21:57:19 UTC+1 schrieb Stephen Butler: > > On Wed, Mar 25, 2015 at 2:27 PM, Sven Mäurer <[email protected] > <javascript:>> wrote: > > backend.conf > > > > Listen 8787 > > > > WSGIScriptAlias / /var/www/html/backend/API/wsgi.py > > WSGIPythonPath > > > /var/www/html/backend:/var/www/html/backend/venv/lib/python2.7/site-packages > > > WSGIPassAuthorization On > > WSGIScriptAlias belongs in your VirtualHost, not at the server config > level. Also... > > > <VirtualHost 81.169.229.41:8787> > > DocumentRoot /var/www/html/backend > > <Directory API/> > > <Files wsgi.py> > > Require all granted > > </Files> > > </Directory> > > > > ErrorLog ${APACHE_LOG_DIR}/error.log > > CustomLog ${APACHE_LOG_DIR}/access.log combined > > > > </VirtualHost> > > This is dangerous. You should never set your DocumentRoot to be where > your code is. A minor misconfiguration in your apache setup could > expose all your source code! Instead set your document root to > something empty (or maybe containing your static files directory) and > do this: > > WSGIPythonPath > /var/www/python/backend:/var/www/python/venv/lib/python2.7/site-packages > > <VirtualHost blah> > DocumentRoot /var/www/html > WSGIScriptAlias / /var/www/python/API/wsgi.py > <Directory /var/www/python/backend/API/> > <Files wsgi.py> > Order deny,allow > Allow from all > </Files> > </Directory> > </VirtualHost> > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/4909fb3a-123e-440b-bf19-787b96a0618c%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.

