Can't connect to nginx server from public IP Address
5,819
The error was that the port was not open from the Azure side. Follow this to allow incoming traffic on port 8080 as described here, reboot the machine and it works fine now.
Related videos on Youtube
Author by
Deepak Saini
Updated on September 18, 2022Comments
-
Deepak Saini over 1 year
Hi I have a nginx server running on a linux machine. I can connect it to from localhost using
curl -v http://localhost:8080
fine. But can't connect it to usingcurl -v http://<machine-ip>:8080
, or from browsers in some other machine.The config file is
server { listen 8080; listen [::]:8080; root /var/www/html; index index.html index.htm index.nginx-debian.html; server_name _; location / { try_files $uri $uri/ =404; } }
Port 8080 is being listened to on IPv4 and IPv6, as
sudo netstat -tulpn | grep nginx
givestcp 0 0 0.0.0.0:8080 0.0.0.0:* LISTEN 123495/nginx: maste tcp6 0 0 :::8080 :::* LISTEN 123495/nginx: maste
The firewall is down, as doing
sudo ufw status
tellstatus: inactive
. I have looked at a lot of answers on various stack exchange sites, but can't figure out the issue. Would appreciate any help. TIA.-
LTPCGO over 4 yearsIs the other machine on the same network or behind a router?
-
-
Deepak Saini over 4 yearsHi @Prithwi, no error is logged.
reload nginx
andrestart nginx
doesn't seem to work