Note that there are some explanatory texts on larger screens.

plurals
  1. POProblem with Django setup using mod_wsgi and apache on centos 5.4
    text
    copied!<p>I am trying to setup apache with mod_wsgi to serve Django through a nginx proxy on CentOS 5.4. I want to start by configuring Apache with Wsgi to serve on a local port, but I get a 403 error when I run <code>curl localhost:8080</code></p> <pre><code># Httpd config: Listen 127.0.0.1:8080 NameVirtualHost 127.0.0.1:8080 &lt;VirtualHost 127.0.0.1:8080&gt; ServerName staging.example.com LogLevel warn ErrorLog /home/django/project_name/log/apache_error.log CustomLog /home/django/project_name/log/apache_access.log combined DocumentRoot /home/django/project_name/django_project_dir/ WSGIDaemonProcess staging.example.com user=apache group=apache threads=25 WSGIProcessGroup staging.example.com WSGIScriptAlias / /home/django/project_name/django_project_dir/django.wsgi &lt;Directory /home/django/project_name/django_project_dir&gt; Order deny,allow Allow from all &lt;/Directory&gt; &lt;/VirtualHost&gt; </code></pre> <p>And my wsgi script: </p> <pre><code>#/home/django/project_name/django_project_dir/django.wsgi ALLDIRS = ['/home/django/project_dir/virtualenv/lib/python2.4/site-packages'] import os import sys import site prev_sys_path = list(sys.path) for directory in ALLDIRS: site.addsitedir(directory) new_sys_path = [] for item in list(sys.path): if item not in prev_sys_path: new_sys_path.append(item) sys.path.remove(item) sys.path[:0] = new_sys_path sys.path.append('/home/django/project_name/') os.environ['PYTHON_EGG_CACHE'] = '/home/django/.python-eggs' os.environ['DJANGO_SETTINGS_MODULE'] = 'settings' import django.core.handlers.wsgi application = django.core.handlers.wsgi.WSGIHandler() </code></pre> <p>What is the problem with this configuration?</p>
 

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