Error: nginx restart failed

Every time I save changes to the domain, I get this error (but it still keeps everything). What can be wrong?

try with the following command:

nginx -t

1 Like

nginx: [emerg] open() “/etc/nginx/conf.d/domains/webmail.clicklogis. com.conf” failed (2: No such file or directory) in /etc/nginx/nginx. conf:160
nginx: configuration file /etc/nginx/nginx. conf test failed

if I try ‘sudo service nginx restart’ then
Job for nginx.service failed because the control process exited with error code.
See “systemctl status nginx.service” and “journalctl -xe” for details.

Then I use ‘systemctl status nginx. service’
● nginx.service - nginx - high performance web server
Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset:>
Active: failed (Result: exit-code) since Tue 2021-07-06 07:48:26 UTC; 24s >
Docs: nginx documentation
Process: 6208 ExecStart=/usr/sbin/nginx -c /etc/nginx/nginx.conf (code=exit>

Jul 06 07:48:26 clicklogis-droplet.example. com systemd[1]: Starting nginx - hig>
Jul 06 07:48:26 clicklogis-droplet.example. com nginx[6208]: nginx: [emerg] open>
Jul 06 07:48:26 clicklogis-droplet.example. com systemd[1]: nginx.service: Contr>
Jul 06 07:48:26 clicklogis-droplet.example. com systemd[1]: nginx.service: Faile>
Jul 06 07:48:26 clicklogis-droplet.example. com systemd[1]: Failed to start ngin>

Space is not allowed

1 Like

Thank you all for your help. I found the cause of the problem. It was necessary to delete all the mail servers and DNS servers that I had created earlier.

I think that this issue is identical to one that I had. After deleting a domain I got a broken link in the nginx directory. If you just delete that link nginx restarts.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.