what can i do ?

Posted February 24, 2021 201 views
NginxUbuntu 18.04

root@django-s-1vcpu-2gb-nyc1-01:/home/django/LZ# sudo nano /etc/nginx/nginx.conf
root@django-s-1vcpu-2gb-nyc1-01:/home/django/LZ# sudo systemctl status nginx
● nginx.service - A high performance web server and a reverse proxy server
Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Wed 2021-02-24 21:00:00 UTC; 3min 0s ago
Docs: man:nginx(8)
Process: 53797 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=1/FAILURE)

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

Hi @enairodiaz,

In such situations, I always recommend checking out the Nginx error log file. In the error_log file you should be able to see the exact reason behind this failure and act upon it.

Normally the file is located in /var/log/nginx/. In that folder it should be called error_log. What you can do is try and get the last lines of the file with

tail -n 30 /path/to/error_log

In there check the messages that say ERROR those are the ones you care about.