Django with mod_wsgi returns 403 error

荒凉一梦 提交于 2019-11-29 15:21:03

Apache runs as a special user, it will not be able to read stuff with permissions of 770.

Watch the talk at:

http://code.google.com/p/modwsgi/wiki/WhereToGetHelp?tm=6#Conference_Presentations

which explains things about permissions.

The key for working out the problem is what error message appears in your Apache error log. You do not even state what error messages you get in the log file. The talk linked to shows what those error messages might be and what they mean.

There is one other gotcha:

Check your httpd.conf file for the following configuration:

<IfModule mime_module>
      AddHandler cgi-script .cgi .pl .py
</IfModule>

This will cause the error.

.py MUST NOT be configured as a CGI script

Try this instead your directories statements:

<Location />
    Order Allow,Deny
    Allow from all
</Location>
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!