错误 403:您无权访问此服务器上的 /
Error 403: You don't have permission to access / on this server
已将我的网络应用程序部署到 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/
我知道这是因为试图访问应用程序文件夹而不是 public 文件夹,但我不知道如何更正它。
我希望服务器访问 public 文件夹,并正确显示网络应用程序。
欢迎所有建议。
提前致谢。
-迈克尔
如果您正在部署 php 文件,那么您需要将 php 文件保存在 web
文件夹中,并且您的 Procfile 应该类似于 web: vendor/bin/heroku-php-apache2 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/
我知道这是因为试图访问应用程序文件夹而不是 public 文件夹,但我不知道如何更正它。
我希望服务器访问 public 文件夹,并正确显示网络应用程序。
欢迎所有建议。 提前致谢。 -迈克尔
如果您正在部署 php 文件,那么您需要将 php 文件保存在 web
文件夹中,并且您的 Procfile 应该类似于 web: vendor/bin/heroku-php-apache2 web/