简体   繁体   English

错误403:您无权访问此服务器上的/

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

Deployed my web app to Heroku, no errors. 将我的Web应用程序部署到Heroku,没有错误。 However when I got to open the app, it says 403 You don't have permission to access / on this server. 但是,当我打开应用程序时,它说403您无权访问/在此服务器上。

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. 我已经查看了“Procfile”的拼写,我尝试使用另一个论坛上提供的代码但是当我尝试部署它时会出现错误。

      "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. 我理解这是由于尝试访问app文件夹而不是公共文件夹,但我不知道如何纠正它。

I hope the server accesses the public folder, and displays the web app correctly. 我希望服务器访问公用文件夹,并正确显示Web应用程序。

All advice is welcome. 欢迎提出所有建议。 Thanks in advance. 提前致谢。 -Michael -Michael

如果你正在部署php文件,那么你需要将php文件保存在像web这样的文件夹中,你的Procfile应该看起来像web: vendor/bin/heroku-php-apache2 web/

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Heroku 上的 Symfony:403 Forbidden 您无权访问 / 在此服务器上 - Symfony on Heroku: 403 Forbidden You don't have permission to access / on this server 错误403禁止访问:对于简单的Heroku构建,您无权访问此服务器上的/ - Error 403 Forbidden: You don't have access to / on this server for simple Heroku build 我将我的 Laravel 项目部署到 Heroku 但 git 这个 403 错误“禁止您无权访问此资源”。 - I deployed my Laravel project into Heroku but git this 403 error “Forbidden You don't have permission to access this resource.” 您无权访问此服务器上的/。 Heroku重定向 - You don't have permission to access / on this server. Heroku redirect Laravel-您无权访问此服务器上的/ images / - Laravel - You don't have permission to access /images/ on this server 禁止在heroku 中托管laravel 应用程序时,您无权访问/ 在此xampp 服务器上 - Forbidden You don't have permission to access / on this xampp server while hosting laravel app in heroku Heroku 上的 Laravel 5.4。 Forbidden 您无权访问此服务器上的 / - Laravel 5.4 on Heroku. Forbidden You don't have permission to access / on this server 无权使用Heroku应用 - Don't have access to Heroku app 如果我无权访问Heroku服务器,如何为New Relic安装PHP代理? - How to install the PHP agent for New Relic if I don't have root access to Heroku server? 无法从 heroku 访问 sqlalchemy 数据库。 关于一些我不存在的“用户”模型的奇怪错误 - Can't access sqlalchemy database from heroku. Strange error about some 'user' model that I don't have not existing
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM