Hi,
I understand that Nginx has to be customized by .ebextensions to get proxy pass working correctly. In my research, however, I have seen two methods:
- .ebextensions/nginx/nginx.conf or .ebextensions/nginx/conf.d/proxy.conf
- .ebextensions/00-nginx-customizations.config
Where (1) creates a file that either overrides or adds to the current Nginx configuration and (2) has yaml definition of a file that will be created.
However, neither of these methods seems to be modifying my Nginx configuration at all. I continue to get this error:
2019-07-22 22:40:57 INFO Environment update is starting.
2019-07-22 22:41:34 INFO Deploying new version to instance(s).
2019-07-22 22:41:41 INFO Successfully pulled ruby:2.3.3
2019-07-22 22:41:42 INFO Successfully built aws_beanstalk/staging-app
2019-07-22 22:41:49 ERROR Failed to start nginx, abort deployment
2019-07-22 22:41:53 ERROR [Instance: i-12345] Command failed on instance. Return code: 1 Output: nginx: [emerg] invalid port in upstream "172.17.0.4:$PORT" in /etc/nginx/conf.d/elasticbeanstalk-nginx-docker-upstream.conf:2
nginx: configuration file /etc/nginx/nginx.conf test failed
Failed to start nginx, abort deployment.
Hook /opt/elasticbeanstalk/hooks/appdeploy/enact/01flip.sh failed. For more detail, check /var/log/eb-activity.log using console or EB CLI.
2019-07-22 22:41:53 INFO Command execution completed on all instances. Summary: [Successful: 0, Failed: 1].
2019-07-22 22:41:54 ERROR Unsuccessful command execution on instance id(s) 'i-00ac10fbc84ade699'. Aborting the operation.
2019-07-22 22:41:54 ERROR Failed to deploy application.
Any ideas? Any way to check what Nginx configuration is being generated?
Thanks,
Mark