Score:0

nginx does not work for my public IP

sv flag

I just installed nginx on my linux machine. I haven't even changed any of the default configurations yet I get no response when trying to call the server from my own public IP address. It works when calling localhost / private machine IP. The default file from /sites-available:

server {
    listen *:80 default_server;
    listen [::]:80 default_server;

    root /var/www/html;

    index index.html index.htm index.nginx-debian.html;

    server_name _;

    location / {
        try_files $uri $uri/ =404;
    }

}

curl response on public IP:

curl: (7) Failed to connect to 89.x.x.x port 80: Connection refused

I tried disabling ufw firewall / enabling ports on it and nothing works. Can anyone point me into right direction?

us flag
Please add information about your network topology.
jp flag
Does your public IP point directly to your server? If your server is behind a router your need to configure port forwarding.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.