Django + Apache + mod_wsgi权限被拒绝 [英] Django + Apache + mod_wsgi permission denied

查看:138
本文介绍了Django + Apache + mod_wsgi权限被拒绝的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Django网站上完成了有关使用mod_wsgi的教程(此处),并在适当时替换了我的路径后,会显示授权被拒绝"字样.当我尝试访问/时.这是我添加到httpd.conf的内容(先前在conf文件中启用了mod_wsgi):

I finished the tutorial on Django's site about using mod_wsgi (here), and having substituted my paths as appropriate, results in a big fat "Permission denied." when I try to access /. Here is the stuff I added to httpd.conf (mod_wsgi is enabled earlier in the conf file):

# Django configuration

WSGIScriptAlias / /usr/local/django/billing/apache/django.wsgi

<Directory /usr/local/django/billing/apache/django.wsgi>
Order allow,deny
Allow from all
</Directory>

AliasMatch ^/([^/]*\.css) /usr/local/wsgi/static/styles/$1

Alias /media/ /usr/local/django/billing/media/
Alias /static/ /usr/local/django/billing/static/

<Directory /usr/local/django/billing/static>
Order deny,allow
Allow from all
</Directory>

<Directory /usr/local/django/billing/media>
Order deny,allow
Allow from all
</Directory>

编辑#1:

从头开始,我已经多次浏览幻灯片:仍然没有喜悦.即使打开了脚本的路径,将每个相关的目录chmod设置为可读状态,然后将.wsgi脚本更改为chmod,我仍然会拒绝权限.如果我将目录路径从/usr/local/django/billing/apache/django.wsgi更改为截断了django.wsgi,则服务器将返回配置错误,尽管这是幻灯片中的配置方式.

I've gone through the slides multiple times, from the start: still no joy. Even after opening up the path to the script, chmod'ing every relevant directory to be readable, and chmod'ing the .wsgi script, I still get permission denied. If I change the directory path from /usr/local/django/billing/apache/django.wsgi to have the django.wsgi truncated, the server returns a configuration error, despite that being how it's configured in the slides.

推荐答案

我遇到了同样的问题,权限被拒绝. https://serverfault.com/questions/357804/apache2-mod-wsgi- django-named-virtual-servers

I had the same problem with permission denied. https://serverfault.com/questions/357804/apache2-mod-wsgi-django-named-virtual-servers

特定错误的描述如下: http://code.google.com/p/modwsgi/wiki/WhereToGetHelp?tm = 6#Conference_Presentations

The specific error is described in: http://code.google.com/p/modwsgi/wiki/WhereToGetHelp?tm=6#Conference_Presentations

这篇关于Django + Apache + mod_wsgi权限被拒绝的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆