-->

Getting 502 proxy error after deploying app to AWS

2019-03-04 23:19发布

问题:

I deployed an Application to AWS elastic beanstalk. When I try to open the application, I am getting 502 proxy error Saying following message.

Proxy Error

The proxy server received an invalid response from an upstream server. The proxy server could not handle the request GET /.

Reason: Error reading from remote server

Apache/2.2.31 (Amazon) Server at mehe.us-west-2.elasticbeanstalk.com Port 80

Strange part is when I run the application from localhost(Still connected to amazon database) the application is working fine, but after deloying it is not working. Here's the link to application

Any ideas how to get rid off it.

回答1:

The timeout value for HTTPD is lower than the timeout value set for ELB. Change the timeout value in /etc/httpd/conf/httpd.conf

The keep the value between reboots you'll need to either create a custom AMI or use .ebextensions feature.