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

若如初见. 提交于 2020-01-26 03:35:26

问题


I'm facing the following message when I visit my website:

You don't have permission to access /index.php on this server.

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.

I have tried many methods to solve it, like editing my httpd.conf file, however it doesn't work. 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>

回答1:


Have you changed anything in your .htaccess file? Also did you change anything in config file such as DB name user and pass?

Also update the permissions to 755 of your public_html.

EDIT

Since you specified its apache, try these solutions:

  • Can you open your APACHE config file and find out the index name?
  • Check your Directive DirectoryIndex and make sure your index is listed, or else upload:

       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:

    #chmod a+x /apache-home-dir-of installation
    
  • Make sure the CGI script requested have executable permissions set on files. Use chmod command to set permission:

    $ chmod +x file.cgi
    
  • Check APACHE logs for errors:

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

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



来源:https://stackoverflow.com/questions/43485301/403you-dont-have-permission-to-access-index-php-on-this-server

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!