[英]Custom nginx configuration for Laravel in AWS Elastic Beanstalk
Hi I am using AWS elastic beanstalk for my Laravel application您好,我正在为我的 Laravel 应用程序使用 AWS elastic beanstalk
When I first uploaded my application it is not showing the login page, 404 error so I tried with app_url/index.php/login and it worked当我第一次上传我的应用程序时,它没有显示登录页面,404 错误所以我尝试使用 app_url/index.php/login 并且它有效
This is how I figure out I need to add this to my Nginx configuration, I manually added this, ssh into ec2 instance, and worked这就是我如何弄清楚我需要将它添加到我的 Nginx 配置中,我手动将它 ssh 添加到 ec2 实例中,并且工作
location / {
try_files $uri $uri/ /index.php?$query_string;
}
but every time I deploy my new code it replaces my manual code但每次我部署新代码时,它都会替换我的手动代码
I also read https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/java-tomcat-proxy.html?icmpid=docs_elasticbeanstalk_console this doc and created this folder structure in my application root folder我还阅读了 https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/java-tomcat-proxy.html?icmpid=docs_elasticbeanstalk_console这个文档并在我的应用程序根文件夹中创建了这个文件夹结构
.ebextensions
nginx
conf.d
elasticbeanstalk
my-server-conf.conf
Seems not working for me Please let me know what should I put In my-server-conf.conf file and what should I do so it works for every deploy似乎对我不起作用请让我知道我应该在 my-server-conf.conf 文件中放什么以及我应该做什么以便它适用于每次部署
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.