我浪費了大約3天的時間,試圖讓Apache與Django一起工作,變得非常沮喪。 香港專業教育學院讀Django 1.4 mod_wsgi - 403禁止訪問/拒絕
https://docs.djangoproject.com/en/1.4/howto/deployment/wsgi/modwsgi/
http://code.google.com/p/modwsgi/wiki/IntegrationWithDjango
鏈路之間的配置不同,我懷疑他們是有點過時,現在使用Django 1.4 在Apache日誌中面臨的錯誤IM是
(13)Permission denied:access/denied
環境:
Python的2.62
的Centos 6.2在Windows Azure上
的Apache/2.2.15
的Django 1.4
路徑:
/家庭/克雷格/ Django的/myproject/myproject/wsgi.py
權限:
/家/:drwxrwxr-X
/家庭/克雷格/:drwxrwxr-X
/家庭/克雷格/ Django的/:drwxrwxr-X
/家/克雷格/ Django的/ myproject的/:drwxrwxr-X
/家庭/克雷格/ Django的/ myproject的/ myproject的/:drwxrwxr-X
/home/craig/django/myproject/myproject/wsgi.py:-rw- [R - R的 -
的http.conf:
DocumentRoot "/var/www/html"
<Directory />
Options FollowSymLinks
AllowOverride All
</Directory>
<Directory /home/craig/django/myproject/myproject>
<Files wsgi.py>
Order deny,allow
Allow from all
</Files>
</Directory>
WSGIScriptAlias//home/craig/django/myproject/myproject/wsgi.py
WSGIPythonPath /home/craig/django/myproject
<VirtualHost *:80>
ServerName myserver.domain.net
</VirtualHost>
wsgi.py
import os
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "myproject.settings")
from django.core.wsgi import get_wsgi_application
application = get_wsgi_application()
這是HTTP的副本://serverfault.com/questions/434020/django-1-4-mod-wsgi-403-forbidden-access-to-denied –