以下服务没有运行:proxy @ AWS -- 在 Laravel 重新配置之后
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/43026829/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Following services are not running: proxy @ AWS -- after Laravel re-config
提问by Dims
I have Laravel application which I learned to run both with php artisan serve
and with local Apache.
我有 Laravel 应用程序,我学会了php artisan serve
与本地 Apache一起运行。
Now I wish to run the same on Amazon Beanstalk.
现在我希望在 Amazon Beanstalk 上运行它。
I have created Beanstalk instance for PHP7. Then I went to Amazon Linux console and installed composer there. I think this was unneeded step.
我已经为 PHP7 创建了 Beanstalk 实例。然后我去了 Amazon Linux 控制台并在那里安装了 Composer。我认为这是不必要的步骤。
Next I acrhived all my Laravel project with ZIP and uploaded it to AWS with web console. First I got Forbidden
error
接下来,我使用 ZIP 获取了我所有的 Laravel 项目,并使用 Web 控制台将其上传到 AWS。首先我得到了Forbidden
错误
as said here: http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/php-laravel-tutorial.html
正如这里所说:http: //docs.aws.amazon.com/elasticbeanstalk/latest/dg/php-laravel-tutorial.html
Then I fixed document root to public/
as said below and now I have health state severe
saying
然后我将文档根目录固定为public/
如下所述,现在我有健康状态severe
说
Impaired services on all instances.
Following services are not running: proxy.
When I am opening site with browser, I see blank page.
当我用浏览器打开网站时,我看到空白页面。
How to see any logs in AWS to understand what is happening?
如何查看 AWS 中的任何日志以了解发生了什么?
What cen be a reason? Project is self-contained, it uses SQLite database inside the codebase. When I was enabling this project on local machine, I was to enable multiple things in Apache and PHP.
什么岑是一个原因?项目是独立的,它在代码库中使用 SQLite 数据库。当我在本地机器上启用这个项目时,我要在 Apache 和 PHP 中启用多个东西。
回答by Dims
It was the problem with ZIP file structure: it contained extra top directory inside. So, on AWS it was /var/app/current/myappname
while should be just /var/app/current
.
这是 ZIP 文件结构的问题:它包含额外的顶级目录。因此,在 AWS 上,它/var/app/current/myappname
应该只是/var/app/current
.
回答by Amr El-Naggar
Did you install mbstring after creating the instance?
创建实例后是否安装了mbstring?
sudo yum install php70w-mbstring
If this isn't the problem, you can view Laravel log in storage/log/laravel.log and tell us what is there to help you.
如果这不是问题,您可以在 storage/log/laravel.log 中查看 Laravel 日志并告诉我们有什么可以帮助您。
回答by Nick
I was getting this error due to Elastic Beanstalk config settings being incorrect, specifically, the Document root was incorrect and was seeing the Following services are not running: proxy.
error in the event log.
由于 Elastic Beanstalk 配置设置不正确,我收到此错误,特别是文档根目录不正确并且Following services are not running: proxy.
在事件日志中看到错误。
回答by Ruan Nawe
When generating the ZIP archive, be sure to generate it within the project folder. So when you open the zip file, you have the app folder, not another folder with the project name.
生成 ZIP 存档时,请确保在项目文件夹中生成它。因此,当您打开 zip 文件时,您将拥有 app 文件夹,而不是具有项目名称的另一个文件夹。