Page 1 of 1

nginx + php-fpm + named doesn't start after server restat

Posted: Thu May 05, 2016 4:47 pm
by lakis21
Hello,
I have to new vps server with CentOS 7.2.1511 both of the fresh install with Vetsta 0.9.8.
Both of them are working fine, but when I am restarting the servers, the nginx + php-fpm + named doesn't start automatically. I have to manual start them.
Any suggestion?
VPS Configutraion:
2 vCores
RAM2 GB RAM
SSD50 GB

Thanks in advance.

Re: nginx + php-fpm + named doesn't start after server restat

Posted: Fri May 06, 2016 5:05 pm
by lakis21
I fix the php-fpm + named to start automatically on reboot with

Code: Select all

systemctl enable php-fpm.service
but I didn't have luck with nginx ...

Re: nginx + php-fpm + named doesn't start after server restat

Posted: Fri May 06, 2016 6:23 pm
by lakis21
Hi I found this solutions on searching:

Code: Select all

nano /usr/lib/systemd/system/nginx.service
replace the first 4 lines:

Code: Select all

[Unit]
Description=Startup script for nginx service
After=network-online.target remote-fs.target nss-lookup.target
Wants=network-online.target
It works on my 2 VPS. :)