【发布时间】:2015-09-05 22:05:44
【问题描述】:
我正在尝试访问一个使用 Apache 运行的网站。问题是我得到一个 403 错误并且只登陆 Permission Denied 错误页面。后端等本身正在使用 Django。
我从错误日志中得到的信息:
(13)权限被拒绝:访问/index/被拒绝
我还将默认的 apache conf 编辑为:
<VirtualHost *:80>
DocumentRoot /var/www
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerM$
Order allow,deny
Allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
# Possible values include: debug, info, notice, warn, $
# alert, emerg.
LogLevel warn
CustomLog /var/log/apache2/acess.log combined
ServerAdmin webmaster@localhost
WSGIDaemonProcess djangoapps python-path=/home/djangoa$
WSGIProcessGroup djangoapps
WSGIScriptAlias / /home/djangoapps/plugit/wsgi.py
<Directory /home/djangoapps/plugit>
<Files wsgi.py>
Require all granted
</Files>
</Directory>
</VirtualHost>
加载的(我希望)wsgi.py 文件不包含比默认内容更多的内容。我还在项目中的所有内容上设置了www-data:www-data..
【问题讨论】:
-
这应该在serverfault.com而不是stackoverflow中询问
标签: python django apache http-status-code-403