跳至內容

Bug: Same AL2 version but different AMIs causes NGINX to fail healthchecks

0

I have dug down a lot to make sure this is a bug and post it here.

I run several workloads on Elastic Beanstalk. The newest app I have deployed on Elastic Beanstalk seems to fail the default 80 port healthchecks. After digging down, I found out that it doesn't detect index.php files.

I run two workloads with the same "PHP 7.4 running on 64bit Amazon Linux 2/3.1.0" version. The older one, that works, has AMI set to ami-0d9f444fde94d8329, but it seems like a newly deployed application has the AMI set to ami-0ebd56d21ef13ef53 that makes NGINX return 404 for PHP applications.

This is not related to healthchecks in the app, as if I SSH into both instances, calling curl http://127.0.0.1 works for the older app, but for newer app it doesn't.

I have tried to change some of the NGINX config files to figure out what is all about, and i realised that in the ~ .php location block check, somehow refuses to read index.php files. If I create an index.html, curl-ing works again. If i let index.php as the only index, it throws 404 and refuses to serve it.

已提問 5 年前檢視次數 320 次
3 個答案
0

After more digging, I found out that http://127.0.0.1 gets 404, while the DNS name i pointed to the AWS EB endpoint via CNAME work. I am now going insane.

已回答 5 年前
0

Finally, after many configuration attempts and checks, I found out that the CNAME that points to my EB Environment DNS is solving correctly the application, but internally, 127.0.0.1:80 is not solving, even tho the listen 80 default_server directive is set and not overwritten by any of my own configuration.

已回答 5 年前
0

It's an issue with my Laravel app's kernel handler. APP_URL enforces DNS solving at the Kernel level within the routing system: https://github.com/laravel/framework/issues/35522

Edited by: rennokki on Dec 7, 2020 6:00 AM

已回答 5 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。