nginx not coming up with ip but works fine with localhost

Posted May 30, 2021 946 views
NginxUbuntu 20.04

As I was following the tutorial :

I have succesfully configured the nignx but I am not able to launch nginx server with my public ip but this works fine with local host. Can some one please help me this?

The command: curl -v doesn’t return the public ip address as well.


These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
1 answer

This is probably an error with port 80. Check your firewall and check if port 80 is allowed to establish connections.

Check firewall status:

sudo ufw status

Allow Nginx Full in the firewall:

sudo ufw allow "Nginx full"

Activate your system firewall:

sudo ufw enable

Read more about firewall here - How To Set Up a Firewall with UFW on Ubuntu 18.04

by Brian Boucheron
by Erika Heidi
UFW, or Uncomplicated Firewall, is an interface to iptables that is geared towards simplifying the process of configuring a firewall on Linux servers. In this guide, you'll learn how to set up a firewall with UFW on Ubuntu 18.04.
  • thanks, @thelovekesh I cross-checked again to see if port 80 was an issue and found it to be not. Can you please let me know if there’s any other issue to e looked at?

     --                         ------      ----

    [ 1] 22/tcp ALLOW IN Anywhere

    [ 2] 443/tcp ALLOW IN Anywhere

    [ 3] 80/tcp ALLOW IN Anywhere

    [ 4] Nginx Full ALLOW IN Anywhere

    [ 5] 8000 ALLOW IN Anywhere

    [ 6] 37234 ALLOW IN Anywhere

    [ 7] OpenSSH ALLOW IN Anywhere

    [ 8] Nginx HTTP ALLOW IN Anywhere

    [ 9] 5601/tcp ALLOW IN Anywhere

    [10] 22/tcp (v6) ALLOW IN Anywhere (v6)

    [11] 443/tcp (v6) ALLOW IN Anywhere (v6)

    [12] 80/tcp (v6) ALLOW IN Anywhere (v6)