我试图在Apache上使用mod_wsgi设置两个独立的Django站点。 第一个网站工作正常,但第二个网站cupaday.dyndns.biz给出了一个403: [Tue Feb 07 22:32:57 2012] [error] [client 68.48.6.208] (13)Permission denied: access to / denied有人看到有什么错? 我读了关于部署多个虚拟服务器,大多数人指出,确保有一个允许所有人的目录指令。 我试图设置这个path到我的应用程序,到wsgi目录和实际的。 就像我说的第一个网站snaganitem工作正常。 有谁知道我可以解决这个问题? 或者有没有办法看到403 errror的详细版本? 谢谢。
NameVirtualHost *:80 <VirtualHost *:80> ServerAdmin [email protected] ServerName snaganitem.com ServerAlias www.snaganitem.com LogLevel warn ErrorLog /var/log/httpd/error.log CustomLog /var/log/httpd/access.log combined WSGIScriptAlias / /home/snaganitem/hackpages/apache2/django.wsgi <Location "/static"> SetHandler None </Location> <Directory /home/snaganitem/hackpages/apache2> Order allow,deny Allow from all </Directory> Alias /static /home/snaganitem/hackpages/static Alias /google927b622c2314fdec.html /home/snaganitem/static_html/google927b622c2314fdec.html </VirtualHost> <VirtualHost *:80> ServerAdmin [email protected] ServerName cupaday.dyndns.biz LogLevel warn ErrorLog /var/log/httpd/error.log CustomLog /var/log/httpd/access.log combined WSGIScriptAlias / /home/cupaday/cup_a_day/wsgi/django.wsgi <Location "/static"> SetHandler None </Location> <Directory /home/cupaday/cup_a_day/wsgi> Order deny,allow Allow from all </Directory> Alias /static /home/cupaday/cup_a_day/static </VirtualHost>
正如在注释中指出的那样,Apache用户很可能无法从WSGI脚本文件的位置读取文件系统权限,或者读取WSGI脚本文件本身。
演示文稿中描述了这个特定的错误:
http://code.google.com/p/modwsgi/wiki/WhereToGetHelp?tm=6#Conference_Presentations