10

I'm attempting to set up Apache 2.2, Django 1.1.2 and Gentoo. I wish to serve my project with the address: /comics

I followed the mod_wsgi directions in the django documentation to the letter, coming up with these files:

/etc/apache2/modules.d/70_mod_wsgi.conf

<IfDefine WSGI>
LoadModule wsgi_module modules/mod_wsgi.so
</IfDefine>

WSGIScriptAlias /comics /home/****/django/comicky/apache/django.wsgi

and

/home/****/django/comicky/apache/django.wsgi
import os
import sys
sys.path.append('/home/****/django')
os.environ['DJANGO_SETTINGS_MODULE'] = 'comicky.settings'
import django.core.handlers.wsgi
application = django.core.handlers.wsgi.WSGIHandler()

However, when I attempt to load the page, I get this in /var/log/apache2/error_log:

client denied by server configuration: /home/****/django/comicky/apache/django.wsgi

Any ideas?

Michael Westbom
  • 359
  • 2
  • 4
  • 13

2 Answers2

7

Sounds like a permissions issue from your conf file. See, for example:

Matt
  • 74,352
  • 26
  • 153
  • 180
ars
  • 120,335
  • 23
  • 147
  • 134
  • I have "AllowOveride All" "Order allow,deny" "Allow from all" – Michael Westbom Sep 09 '10 at 03:39
  • 3
    is correct, this indicates that you haven't correctly told Apache that it can serve up that resource. See my talk slides at http://code.google.com/p/modwsgi/downloads/detail?name=mod_wsgi-pycon-sydney-2010.pdf where I explicitly show this. If you go to wiki on mod_wsgi site you will also find link to video of talk. – Graham Dumpleton Sep 09 '10 at 10:54
  • Thanks. I didn't include the necessary directives. I only had "/", not the actual folder of my app. That problem is solved. Now just to resolve some weird library issues, but I won't make you guys fix that one for me. – Michael Westbom Sep 10 '10 at 01:58
0

Make sure your conf file matches this: conf sample file. I had to add the wsgi.py at the end to make mine work

yusav
  • 11
  • 1