1

I've installed nginx on a client's Digital Ocean Node.js Ubuntu 14.04 droplet with sudo apt-get install nginx however, I cannot access the server's static files from the web browser. Having installed nginx several times previously on other identical servers of my own, I have never encountered any problems so I assume it must be something the client has changed themselves.

I've checked the all processes are running with ps aux | grep nginx which returns:

root     13060  0.0  0.1  85880  1336 ?        Ss   18:44   0:00 nginx: master p
rocess /usr/sbin/nginx
www-data 13061  0.0  0.1  86220  1764 ?        S    18:44   0:00 nginx: worker p
rocess
www-data 13062  0.0  0.1  86220  1764 ?        S    18:44   0:00 nginx: worker p
rocess
www-data 13063  0.0  0.1  86220  1764 ?        S    18:44   0:00 nginx: worker p
rocess
www-data 13064  0.0  0.1  86220  1764 ?        S    18:44   0:00 nginx: worker p
rocess
sysadmin 13080  0.0  0.0  11740   932 pts/0    S+   19:23   0:00 grep --color=au
to nginx

I've checked port 80 with nmap -p 80 localhost which returns:

Nmap scan report for localhost (127.0.0.1)
Host is up (0.00012s latency).
PORT   STATE SERVICE
80/tcp open  http

I am using the default config in sites-available and have confirmed it is symlinked in sites-enabled. I've checked the config of default against another default install and both are identical. I've tried changing the nginx root folder to /home/user and placed an index.html there with 'Hello World'. Still nothing on browser, which simply returns ERR_CONNECTION_TIMED_OUT.

I don't have much experience with Linux or Nginx but I'd rather solve this problem myself than having to ask the client if they have changed something on the server. How can I start to debug the issue here?

1
  • Is there AppArmor blocking nginx access to files or the network? Are permission to www-data user set correctly? (I don't think that the www-data user can, by default, read directories under /home/user...) Jun 20, 2015 at 21:50

1 Answer 1

1

I would recommend disable your firewall temporarily; if you can then access the website in the browser then it was the firewall blocking the connection and in which case you will have to allow that port threw the firewall.

Hope this helps.

1
  • It was indeed a firewall blocking port 80, many thanks
    – Findiglay
    Jun 23, 2015 at 10:11

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .