Setup Ubuntu 14.04 and Nginx and not the default Nginx page does not resolve, what are the first debug steps?

by Shwaydogg   Last Updated October 05, 2015 06:00 AM

On a fresh Ubuntu 14.04 virtual machine I've run the following commands:

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install nginx

sudo service nginx start

In a browser if I go to the VM's ip or domain the default nginx page is not shown, the page times out with ERR_CONNECTION_TIMED_OUT. [I'm able to ssh in with both the ip and domain to run the commands above].

Error logs at /var/log/nginx/error.log just show the starting and stopping of nginx.

What are the first steps for debugging from here? Or was there an obvious step missed...

[Update] Specific Details:

40.122.209.66 and dixy.cloudapp.net are the ip and domain.

The vm is on and set up by Microsoft Azure, (but as stated it's standard Ubuntu 14.04 LTS install, afaik.)

[Update] netstat -plunk:

While nginx is running the following two lines are within the netstat -plunt results:

$ sudo netstat -plunt
...
tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN      12391/nginx
...
tcp6       0      0 :::80                   :::*                    LISTEN      12391/nginx
...

Looks like nginx is listening on port 80, so that doesn't seem to be the issue.

[Update] tcpdump:

Also did the following:

$ sudo tcpdump -vvv -i any -s 1600 icmp
    tcpdump: listening on any, link-type LINUX_SLL (Linux cooked), capture size 1600 bytes
00:24:47.349518 IP (tos 0xc0, ttl 64, id 63335, offset 0, flags [none], proto ICMP (1), length 102)
    100.116.246.55 > 100.116.246.13: ICMP 100.116.246.55 udp port 38168 unreachable, length 82
        IP (tos 0x0, ttl 128, id 352, offset 0, flags [DF], proto UDP (17), length 74)
    100.116.246.13.domain > 100.116.246.55.38168: [udp sum ok] 34699 ServFail q: PTR? 217.116.189.193.in-addr.arpa. 0/0/0 (46)
00:24:57.365520 IP (tos 0xc0, ttl 64, id 64382, offset 0, flags [none], proto ICMP (1), length 102)
    100.116.246.55 > 100.116.246.13: ICMP 100.116.246.55 udp port 41763 unreachable, length 82
        IP (tos 0x0, ttl 128, id 565, offset 0, flags [DF], proto UDP (17), length 74)
    100.116.246.13.domain > 100.116.246.55.41763: [udp sum ok] 33980 ServFail q: PTR? 217.116.189.193.in-addr.arpa. 0/0/0 (46)


Answers 1


Although Nginx was listening on port 80, you have to set port 80 to be open to http connections in Azure.

Shwaydogg
Shwaydogg
October 05, 2015 14:02 PM

Related Questions





start-stop-daemon not working as expected

Updated June 10, 2015 04:00 AM