Custombuild 2 Fresh LXC Centos 7 container, Nginx not working

Goldy

New member
Joined
Oct 29, 2015
Messages
3
Hello,

Not sure if anyone has come across this but I have just installed a fresh directadmin box on an LXC container (proxmox 4.2) and found that when I change from apache to nginx with custombuild I get issues with nginx starting.

The error is shown as this: PID file /run/nginx.pid not readable (yet?) after start.

It turns out the issue is related to the systemd script /etc/systemd/system/nginx.service stores the PID file in /run/nginx.pid

However the /etc/nginx/nginx.conf thinks the PID is stored /var/run/nginx.pid the result being nginx not running correctly.

To correct this I changed the config file to reflect the systemd config file however I am not 100% sure which should win and if this is simply a bug with an updated conf file.

I hope this helps someone as I could not find anything specifically related to directadmin with this error but did manage to find a few bits of info on google that pointed me in the right direction.
 
I would suggest you the other way around, pont the systemd script to /var/run/nginx.pid because that's where the pid files should be ;)

Also, you may want to try to remove the systemd file and use custombuild to build nginx again, if the problem persist, i would suggest you to contact DA Staff using their ticket system to notify them about this bug.

Best regards
 
Back
Top