i have launched aws ec2 intance with ubuntu ami & inbount rule of all traffic. inbound rule all traffic .connected to instance and entered code below to install nginx

sudo apt update 
sudo apt install nginx

then sudo systemctl start nginx and checked nginx status it was active runnning but i cant access ip adress. chrome shows This site can't be reached i was expecting "welcome to nginx" message in my public ip. i have checked www/html folder, there is the welcome index.html file, i think installation is correct.but still site is not reached i'm newbie. pls help me

  • i tried curl localhost and i got nginx welcome html message Commented Mar 14 at 11:59

2 Answers 2


It was very simple. My Public IP was run on https. When I manually changed it to HTTP I got my site working.


Are you using the default nginx configuration file (probably under (/etc/nginx/nginx.conf)? Is it possible that it says something like

    server {
        listen       80;
        server_name  localhost;

If yes, this could mean that nginx is binding only on localhost. This would explain why you can reach the page only from (precisely) localhost. Probably you should set it up to bind on public IP (or the server name or dns name or public ip, etc.) in order to reach it from outside.
But this is only my guess.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .