Answer a question

I've created an environment in AWS which includes an EC2 instance with node js web-server and Nginx installed, behind a self-signed application load balancer.

My ALB gets requests from HTTPS (443) and forwards them on HTTP (80) to the Nginx. My Nginx should get the requests from the ALB (in port 80) and forward them on port 9090 (which used by the node js web server).

However, I'm having issues with translating the requests from the Nginx to the application. When entering the URL with the ALB DNS on HTTP I'm able to get to the above page (instead of my webserver application page): enter image description here

My default.conf file attached above: enter image description here

All my security groups are open to test the problem (on 443, 80, 9090). so ports are not the problem, but the Nginx configuration.

Also, my target group presented above: enter image description here

What could be the problem / what further configuration should I do? Thank you.

Answers

Worked. The problem was in the "/etc/nginx/nginx.conf" file. After a lot of reading and try - I've found that inside the file it forwards to HTML (instead of my nodejs web server). Changed the line of "root /path_to_ws", restarted Nginx and it worked. Thank you for the help!

Logo

开发云社区提供前沿行业资讯和优质的学习知识,同时提供优质稳定、价格优惠的云主机、数据库、网络、云储存等云服务产品

更多推荐