I'm on nginx-1.26.2-r6 When starting: ~ # /etc/init.d/nginx restart * Starting nginx ... * start-stop-daemon: did not create a valid pid in `/run/nginx/nginx.pid' * Failed to start nginx [ !! ] * ERROR: nginx failed to start but: ~ # ps aux | grep nginx root 2102 0.0 0.1 63592 3792 ? Ss 10:19 0:00 nginx: master process /usr/sbin/nginx -c /etc/nginx/nginx.conf nginx 2103 0.0 0.4 63876 8512 ? S 10:19 0:00 nginx: worker process nginx 2104 0.0 0.4 63840 8572 ? S 10:19 0:00 nginx: worker process and: ~ # cat /run/nginx.pid 2102 So basically it writes /run/nginx.pid but /run/nginx/nginx.pid is expected. Probably broken by: commit 108a642ef4da9fa6ae4f0d33580a05cea3f70678 Author: Alexander Lopatin <alopatindev@codonaft.com> Date: Sat Sep 14 01:01:51 2024 +0800 www-servers/nginx: fix directory path to pid file Closes: https://bugs.gentoo.org/939560 Signed-off-by: Alexander Lopatin <alopatindev@codonaft.com> Closes: https://github.com/gentoo/gentoo/pull/38593 Signed-off-by: Joonas Niilola <juippis@gentoo.org>
See https://bugs.gentoo.org/939560#c6.
Yeah, etc-update or dispatch-conf should be triggered on update. But I'll admit it's not obvious why "pid /run/nginx.pid" is removed from nginx.conf, and maybe the config file itself should have a comment about it. # Handled by init.d/service files now. # pid /run/nginx.pid; Although doing that requires some extra steps in the ebuild :I
etc-update did not propose anything :/ Anyway I had: pid /run/nginx.pid; in nginx.conf