简体   繁体   English

Apache 403权限被拒绝

[英]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.

相关问题 从 PubSub 访问 AutoML 的 403 权限被拒绝 - 403 permission denied to access AutoML from PubSub 权限被拒绝,Python,CGI,Apache - Permission denied,Python , CGI ,Apache apache 配置中的权限被拒绝:[Errno 13] 权限被拒绝 - permission denied in apache configuration : [Errno 13] Permission denied Apache:Errno 13文件权限被拒绝 - Apache: Errno 13 file permission denied 更改 python shebang 后 apache 权限被拒绝 - apache permission denied after changing python shebang Box Access denied - 权限不足 403 Python JWT sdk - Box Access denied - insufficient permission 403 Python JWT sdk foob​​ar Google - 错误 403 权限被拒绝 - 编程挑战 - foobar Google - Error 403 permission denied - programming challenge 熊猫read_html给我的权限被拒绝(403) - Pandas read_html gives me Permission denied(403) Django-部署,静态为403,但应具有权限,wsgi + Apache - Django - deployed, 403 for static but it should have permission, wsgi + Apache 批量翻译的 IAM 权限问题:PermissionDenied:403 Cloud IAM 权限“cloudtranslate.generalModels.batchPredict”被拒绝 - IAM permission issue with Batch Translation: PermissionDenied: 403 Cloud IAM permission 'cloudtranslate.generalModels.batchPredict' denied
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM