简体   繁体   English

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

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

I'm facing the following message when I visit my website: 当我访问我的网站时,我面临以下消息:

You don't have permission to access /index.php on this server. 您无权访问此服务器上的/index.php。

I am able to visit my other website in same URL, as in http://xiukun.wang/scrapy/ , but http://xiukun.wang/datavis/ doesn't work. 我可以使用与http://xiukun.wang/scrapy/相同的URL访问其他网站,但是http://xiukun.wang/datavis/不起作用。

I have tried many methods to solve it, like editing my httpd.conf file, however it doesn't work. 我尝试了许多方法来解决它,例如编辑我的httpd.conf文件,但是它不起作用。 How do I solve it? 我该如何解决?

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

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

Have you changed anything in your .htaccess file? 您是否更改了.htaccess文件中的任何内容? Also did you change anything in config file such as DB name user and pass? 您还更改了配置文件中的任何内容,例如DB名称user和pass吗?

Also update the permissions to 755 of your public_html. 还将权限更新为您的public_html的755。

EDIT 编辑

Since you specified its apache, try these solutions: 由于您指定了其apache,请尝试以下解决方案:

  • Can you open your APACHE config file and find out the index name? 您可以打开APACHE配置文件并找出索引名称吗?
  • Check your Directive DirectoryIndex and make sure your index is listed, or else upload: 检查您的Directive DirectoryIndex并确保列出您的索引,否则上传:

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

    Check for correct dir permissions: 检查正确的目录权限:

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

     #chmod a+x /apache-home-dir-of installation 
  • Make sure the CGI script requested have executable permissions set on files. 确保请求的CGI脚本对文件设置了可执行权限。 Use chmod command to set permission: 使用chmod命令设置权限:

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

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

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

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

相关问题 HTTPS错误-您无权访问此服务器上的/index.php - HTTPS error - You don't have permission to access /index.php on this server 403禁止访问您没有访问此服务器上的/c:/wamp/www/index.php的权限 - 403 Forbidden You dont have permission to access /c:/wamp/www/index.php on this server 如何在64位WAMP 3上修复“您无权访问此服务器上的/index.php。” - How to fix “You don't have permission to access /index.php on this server.” on 64bit WAMP 3 Laravel 403 Forbidden:您无权在生产环境中访问此服务器上的/index.html - Laravel 403 Forbidden: You don't have permission to access /index.html on this server in production 为PHP配置httpd.conf(您无权访问此服务器上的/php/php-cgi.exe/index.php。) - configure httpd.conf for PHP ( You don't have permission to access /php/php-cgi.exe/index.php on this server. ) 您无权访问此服务器上的check.php - You don't have permission to access check.php on this server 您无权访问此服务器上的/send.php - You don't have permission to access /send.php on this server W7,apache,php:禁止访问403您无权访问/phptest/phpinfo.php - W7, apache, php: 403 Forbidden You don't have permission to access /phptest/phpinfo.php (403) 禁止。 您无权访问此资源 - (403) Forbidden. You don't have permission to access this resource 403 Forbidden 您无权访问此资源 - 403 Forbidden You don't have permission to access this resource
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM