Just set up NGinx - now my domain times out before loading.

Posted September 25, 2021 79 views
NginxDigitalOcean Droplets

I set up NGinx on my digital ocean droplet using the instructions linked, which I followed exactly.
I am at the stage where I should be able to visit my domain and see the contents of the index.html file I set up, but when I try to visit the page using Google Chrome, the page does not appear to load, then displays an error message to the effect that my domain took too long to respond. I’ve run nginx status, which results in the following:

nginx.service - A high performance web server and a reverse proxy server
     Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset>
     Active: active (running) since Sat 2021-09-25 16:41:49 UTC; 5s ago
       Docs: man:nginx(8)
    Process: 87825 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_pro>
    Process: 87836 ExecStart=/usr/sbin/nginx -g daemon on; master_process on; >
   Main PID: 87840 (nginx)
      Tasks: 2 (limit: 1136)
     Memory: 2.6M
     CGroup: /system.slice/nginx.service
             ├─87840 nginx: master process /usr/sbin/nginx -g daemon on; master>

I’ve never used Nginx before, so I have no idea what to do to further troubleshoot the issue. Any advice or insight would be so greatly appreciated!
Thank you!

Edit: Visiting my IP Address instead of my domain results in the default Nginx page. Before I followed the tutorial, this also appeared when accessing my domain name.

running nginx -t results in the following:
nginx: [alert] could not open error log file: open() "/var/log/nginx/error.log" failed (13: Permission denied)
2021/09/25 17:03:08 [warn] 88060#88060: the "user" directive makes sense only if the master process runs with super-user privileges, ignored in /etc/nginx/nginx.conf:1
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
2021/09/25 17:03:08 [emerg] 88060#88060: open() "/run/" failed (13: Permission denied)
nginx: configuration file /etc/nginx/nginx.conf test failed

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
1 answer


As the Nginx welcome page loads fine when visiting your IP address, this indicates that the service has been installed correctly.

If your domain name is timing out, this could also be due to a recent DNS change. Can you confirm when did you update your DNS to point to your Droplet? Keep in mind that it could take up to a few hours for the DNS to propagate over the Globe before you could see your new changes.

The warning that you are getting when running nginx -t could happen if you are logged in as a non-root user. In this case you need to use sudo:

sudo nginx -t

Let me know how it goes.