我在主目錄中創建了Django項目,所以它在主目錄中。 /home/aettool/aet/apache/django.wsgi
403 Django和mod_wsgi的禁止錯誤
import os
import sys
os.environ['DJANGO_SETTINGS_MODULE'] = 'aet.settings'
import django.core.handlers.wsgi
application = django.core.handlers.wsgi.WSGIHandler()
Contect的
設置
Django Verison : 1.5.1
Python Version : 2.7.5
mod_wsgi Version: 3.4
Home Directory : /home/aettool
內容的httpd.conf
WSGIScriptAlias//home/aettool/aet/apache/django.wsgi
<Directory /home/aettool/aet/apache>
Order deny,allow
Allow from all
</Directory>
錯誤error_log
[Sun Jul 21 02:01:30.923364 2013] [authz_core:error] [pid 21540:tid 1193011520] [client 10.20.17.184:51340] AH01630: client denied by server configuration: /home/aettool/aet/apache/django.wsgi
的urls.py
的/home/aettool/aet : 775
的/home/aettool/aet/apache : 755
權限
from django.conf.urls import patterns, include, url
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
url(r'^admin/', include(admin.site.urls)),
)
權限的內容級權限的django.wsgi file : 664
我在瀏覽器403 Forbidden
You don't have permission to access/on this server.
收到錯誤,請幫我出的配置。
編輯
現在我改變
<Directory />
AllowOverride none
Require all denied
</Directory>
前進到
<Directory />
Order deny,allow
Allow from all
</Directory>
所以,這無疑是與httpd.conf
文件的配置,但我的擔心是我只在該文件中添加了5行,無法找出錯誤。
請告訴我們你的'urls.py' –
的問題 – g4ur4v
杜佩說:http://stackoverflow.com/questions/4807176/apache-mod-wsgi-error-forbidden-you-dont-have -per-s-access-on-this-s?rq = 1 –