Note that there are some explanatory texts on larger screens.

plurals
  1. POApache 2 + mod_wsgi + WSGIScriptAlias
    primarykey
    data
    text
    <p>I am currently doing research whether Python and Django are fit for a project that I'm going to work on (so far it looks good). As a means of a test, I want to get python running on an actual server (apache2 on ubuntu), using mod_wsgi, but I just can't make it work. Here is my httpd.conf (located at /etc/apache2/httpd.conf):</p> <pre><code>WSGIScriptAlias /test/tc-test/ /var/www/stage/hello/tc-test/django.wsgi WSGIPythonPath /var/www/stage/test/tc-test/ &lt;Directory /var/www/stage/test/tc-test&gt; &lt;Files wsgi.py&gt; Order deny,allow Allow from all &lt;/Files&gt; &lt;/Directory&gt; </code></pre> <p>My django.wsgi looks as follows: </p> <pre><code>import os import sys sys.path.append('/var/www/stage/test/tc-test') os_environment['DJANGO_SETTINGS_MODULE'] = 'settings' import django.core.handlers.wsgi application = django.core.handlers.wsgi.WSGIHandler() </code></pre> <p>The url for this directory will be <a href="http://stage.website.com/test/tc-test" rel="noreferrer">http://stage.website.com/test/tc-test</a></p> <p>Strangely enough, when I reboot the apache server, I keep getting 500 internal server errors. Not just for that subdirectory, but for all other subdirectories on the server. I looked at the apache error log, but for some reason no error is being logged at all. I managed to narrow down the culprits to WSGIScriptAlias and WSGIPythonPath: when I remove both of them, the 500 internal server errors disappear, and when I add any of them, they appear again. I have confirmed that mod_wsgi is working like it should, and it's probably something very simple that I'm looking over. I just can't find out what. Any help on this?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload