[英]Apache 403 Permission Denied
I am trying to access a website which I am running with Apache. 我正在尝试访问一个我正在使用Apache运行的网站。 The issue is that that I get a 403 Error and only land on the Permission Denied error page.
问题是我收到403错误,并且仅进入“权限被拒绝”错误页面。 The backend etc. itself is using Django.
后端等本身正在使用Django。
What I get from the error log: 我从错误日志中得到了什么:
(13)Permission denied: access to /index/ denied
(13)权限被拒绝:访问/ index /被拒绝
I also edited the default apache conf to this: 我还编辑了默认的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>
The loaded (I hope) wsgi.py file doesn't include more then the default content yet. 加载的(我希望)wsgi.py文件没有包含比默认内容更多的文件。 I also set
www-data:www-data
on everything in the project.. 我还在项目中的所有内容上都设置了
www-data:www-data
。
Which OS are you using?? 您正在使用哪个操作系统? Are you getting root access to your server??
您是否获得对服务器的root访问权限? If yes, check if SELinux is disabled or not.
如果是,请检查SELinux是否被禁用。 If not, then disable it by running
setenforce 0
on your server's terminal to disable it. 如果不是,则通过在服务器终端上运行
setenforce 0
禁用它来禁用它。
Q. What is SELinux? 问:什么是SELinux?
A. Security-Enhanced Linux (SELinux) is a Linux kernel security module (kind of a system firewall) similar to AppArmour. 答: 增强安全性的Linux(SELinux)是类似于AppArmour的Linux内核安全性模块(一种系统防火墙)。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.