我在主目录中创建了 Django 项目,因此它位于主目录中。
设置
Django Verison : 1.5.1
Python Version : 2.7.5
mod_wsgi Version: 3.4
Home Directory : /home/aettool
的内容/home/aettool/aet/apache/django.wsgi
import os
import sys
os.environ['DJANGO_SETTINGS_MODULE'] = 'aet.settings'
import django.core.handlers.wsgi
application = django.core.handlers.wsgi.WSGIHandler()
联系方式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
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)),
)
的权限/home/aettool/aet : 775
的权限/home/aettool/aet/apache : 755
的权限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 行并且无法找出问题所在。