I set up NGinx on my digital ocean droplet using the instructions linked, which I followed exactly. https://www.digitalocean.com/community/tutorials/how-to-install-nginx-on-ubuntu-18-04 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.
nginx -t results in the following:
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```
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
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.
Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.
Click below to sign up and get $200 of credit to try our products over 60 days!