yushengc
yushengc

Reputation: 11

hosting multiple sites on Amazon ec2 but got ERR_CONNECTION_TIMED_OUT

I tried to host multiple sites on Amazon ec2 using nginx on different port connecting(port 80, and 81), but I only can access the site with port 80.

first, I set up security group on amazon EC2 console (port 80 and 81) as following picture. security groups setting on Amazon EC2 console

and I set up nginx.config on remote ubuntu server as follows:nginx.conf setting on remote ubuntu server

I tried to switch sites with different ports, but always the site with port 80 can be accessed and I cannot access the website on port 81 with ERR_CONNECTION_TIMED_OUT. I could not figure out what happened. How can I debug this problem?

Upvotes: 0

Views: 234

Answers (1)

Felix
Felix

Reputation: 10078

What OS are you using? I remember RedHat Linux had iptables running in addition to Amazon security groups. Can you ssh to the box and run something like wget http://localhost:81 and see if you get results?

Upvotes: 1

Related Questions