Join 1M+ other developers and:
- Get help and share knowledge in Q&A
- Subscribe to topics of interest
- Get courses & tools that help you grow as a developer or small business owner
Just set up NGinx - now my domain times out before loading.
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!
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.
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/nginx.pid" 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.×