繁体   English   中英

403:您无权访问此服务器上的/index.php

[英]403:You don't have permission to access /index.php on this server

当我访问我的网站时,我面临以下消息:

您无权访问此服务器上的/index.php。

我可以使用与http://xiukun.wang/scrapy/相同的URL访问其他网站,但是http://xiukun.wang/datavis/不起作用。

我尝试了许多方法来解决它,例如编辑我的httpd.conf文件,但是它不起作用。 我该如何解决?

<Directory "/alidata/www">
    AllowOverride none
    Require all granted
</Directory>

DocumentRoot "/alidata/www"
<Directory "/alidata/www">
    Options Indexes FollowSymLinks
    AllowOverride all
    Require all granted
</Directory>

您是否更改了.htaccess文件中的任何内容? 您还更改了配置文件中的任何内容,例如DB名称user和pass吗?

还将权限更新为您的public_html的755。

编辑

由于您指定了其apache,请尝试以下解决方案:

  • 您可以打开APACHE配置文件并找出索引名称吗?
  • 检查您的Directive DirectoryIndex并确保列出您的索引,否则上传:

      DirectoryIndex index.html index.cgi index.pl index.php index.xhtml 

    检查正确的目录权限:

     <Directory "/home/domain/www"> Options +Indexes FollowSymLinks +ExecCGI AllowOverride AuthConfig FileInfo Order allow,deny Allow from all </Directory> 
  • 修改已安装APACHE的主目录的文件系统权限:

     #chmod a+x /apache-home-dir-of installation 
  • 确保请求的CGI脚本对文件设置了可执行权限。 使用chmod命令设置权限:

     $ chmod +x file.cgi 
  • 检查APACHE日志中的错误:

     # tail -f /path/to/apache/error.logs 

资料来源: https : //www.cyberciti.biz/faq/apache-403-forbidden-error-and-solution/

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM