Deployed my web app to Heroku, no errors. However when I got to open the app, it says 403 You don't have permission to access / on this server.
I have already looked into the spelling of "Procfile" and I tried using the code provided on another forum but it springs an error when I try to deploy it.
"php artisan clear-compiled",
"php artisan optimize",
"chmod -R 777 AAS/public/"
]
This is the error that shows in the server logs.
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/
I understand this is due to trying to access the app folder instead of public folder but I have no clue how to correct that.
I hope the server accesses the public folder, and displays the web app correctly.
All advice is welcome. Thanks in advance. -Michael
如果你正在部署php文件,那么你需要将php文件保存在像web
这样的文件夹中,你的Procfile应该看起来像web: vendor/bin/heroku-php-apache2 web/
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.