Page 1 of 1

Nginx fails to start

Posted: Tue Sep 27, 2016 8:07 am
by ozdamar
After i remove a domain aliases and add it as a normal domain nginx failing to start

I get this mail

Code: Select all

The service command supports only basic LSB actions (start, stop, restart, try-restart, reload, force-reload, status). For other actions, please try to use systemctl.
Redirecting to /bin/systemctl restart  nginx.service
Job for nginx.service failed because the control process exited with error code. See "systemctl status nginx.service" and "journalctl -xe" for details.

Re: Nginx fails to start

Posted: Tue Sep 27, 2016 8:44 am
by ozdamar
to investigate

Code: Select all

root@srv ~]# nginx -t -c /etc/nginx/nginx.conf
nginx: [emerg] the same path name "/var/cache/nginx/domain.com" used in /etc/                                                                                                             nginx/conf.d/01_caching_pool.conf:2 and in /etc/nginx/conf.d/01_caching_pool.con                                                                                                             f:8
nginx: configuration file /etc/nginx/nginx.conf test failed
You have new mail in /var/spool/mail/root

Re: Nginx fails to start

Posted: Tue Sep 27, 2016 11:32 am
by tjebbeke
When you open /etc/nginx/conf.d/01_caching_pool.conf You will see 2 line with the same content /var/cache/nginx/domain.com.
Delete one of this lines and try again.

Re: Nginx fails to start

Posted: Sun Nov 13, 2016 8:35 am
by Spooney
Great, that solved my problem too, thanks!