簡體   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