Score:0

Make port 80 globally accessible

tj flag

I am trying to set up a VPS server (Ubuntu 22.04 LTS) bought from Microsoft. I am able to set up NGINX on my own by watching this tutorial. After setting up all the configs stated in the video I ran nginx -t to confirm if all the setup was correct. It ran without any error. Now the main concern is in the tutorial it is using Hostinger provider which by default made port 80 public but in my VPS it is not.

After watching few blogs & questions in stack I ran the follow sudo ufw status command to see if HTTP & NGINX is enabled or not for which I got this.

root@Online-Test-UBUNTU-22-04:/# sudo ufw status
Status: active

To                         Action      From
--                         ------      ----
Nginx HTTP                 ALLOW       Anywhere
22/tcp                     ALLOW       Anywhere
80/tcp                     ALLOW       Anywhere
80                         ALLOW       Anywhere
Nginx Full                 ALLOW       Anywhere
Nginx HTTP (v6)            ALLOW       Anywhere (v6)
22/tcp (v6)                ALLOW       Anywhere (v6)
80/tcp (v6)                ALLOW       Anywhere (v6)
80 (v6)                    ALLOW       Anywhere (v6)
Nginx Full (v6)            ALLOW       Anywhere (v6)

root@Online-Test-UBUNTU-22-04:/# 

Below is my custom server config code stored in /etc/nginx/sites-enabled/otp

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

        root /var/www/html;
        index index.html index.htm index.nginx-debian.html;

        server_name X.X.X.X;

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

How can I solve this problem?

in flag
Have you verified [the network security group is properly configured](https://learn.microsoft.com/en-us/azure/virtual-machines/windows/nsg-quickstart-portal)?
Avishek avatar
tj flag
Thanks @matigo, this helped. I was not aware of this. Thanks a lot again. Was stuck here for last 3 days
I sit in a Tesla and translated this thread with Ai:

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.