Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Having trouble running nginx on EC2 instance

I installed Nginx with phusion passenger, but I am having trouble accessing the server. I am using the default configuration file, yet I never get a response from the server when I try to visit the IP address in my browser. On my server I can do :

curl 127.0.0.1

To get a response, but visiting the IP address in the browser always times out. I made sure port 80 was open by executing sudo iptables -A INPUT -p tcp --dport 80 -j ACCEPT, but nothing changed. I am using Ubuntu.

like image 679
Max Avatar asked Nov 01 '25 12:11

Max


1 Answers

Possible error-sources:

  • You use the internal EC2 ip and not the public.
  • You don't have any security policies set and you are hitting the EC2 firewall.
  • iptables is not configured correctly, disable it until it works without.
  • Nginx does not listen on the correct port. Use the default config.
like image 112
Gustav Avatar answered Nov 03 '25 07:11

Gustav



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!