簡體   English   中英

錯誤403:您無權訪問此服務器上的/

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

將我的Web應用程序部署到Heroku,沒有錯誤。 但是,當我打開應用程序時,它說403您無權訪問/在此服務器上。

我已經查看了“Procfile”的拼寫,我嘗試使用另一個論壇上提供的代碼但是當我嘗試部署它時會出現錯誤。

      "php artisan clear-compiled",
      "php artisan optimize",
      "chmod -R 777 AAS/public/"
    ]

這是服務器日志中顯示的錯誤。

 2019-05-07T15:41:17.899066+00:00 app[web.1]: [Tue May 07 15:41:17.895803 2019] [autoindex:error] [pid 138:tid 140579161761536] [client 10.11.89.47:16532] AH01276: Cannot serve directory /app/: No matching DirectoryIndex (index.php,index.html,index.htm) found, and server-generated directory index forbidden by Options directive, referer: https://dashboard.heroku.com/

我理解這是由於嘗試訪問app文件夾而不是公共文件夾,但我不知道如何糾正它。

我希望服務器訪問公用文件夾,並正確顯示Web應用程序。

歡迎提出所有建議。 提前致謝。 -Michael

如果你正在部署php文件,那么你需要將php文件保存在像web這樣的文件夾中,你的Procfile應該看起來像web: vendor/bin/heroku-php-apache2 web/

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM