nginxinc / nginx-amplify-agent

NGINX Amplify Agent
BSD 2-Clause "Simplified" License
23 stars 9 forks source link

Nginx -t fails #47

Closed malsatin closed 1 year ago

malsatin commented 5 years ago

Hi.

If Enable periodic "nginx -t" is turned on in control panel, then I regularly receive error

2019/04/05 07:32:32 [warn] 23927#23927: the "user" directive makes sense only if the master process runs with super-user privileges, ignored in /etc/nginx/nginx.conf:1
2019/04/05 07:32:32 [emerg] 23927#23927: open() "/run/nginx.pid" failed (13: Permission denied)

in nginx error.log

If I would run sudo -u www-data nginx -t then the full error is

nginx: [warn] the "user" directive makes sense only if the master process runs with super-user privileges, ignored in /etc/nginx/nginx.conf:1
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: [emerg] open() "/run/nginx.pid" failed (13: Permission denied)
nginx: configuration file /etc/nginx/nginx.conf test failed

Can that be fixed somehow?