A/c to http://wiki.nginx.org/CoreModule#user
master process used to run with root user, is it possible to run nginx mater process with different user?
It is possible to run the nginx master process with a different user by just running the init script as non root (i.e. /etc/init.d/nginx start
).
If this is really what you want to do, you will need to ensure the log and pid directories (usually /var/log/nginx
& /var/run/nginx.pid
) are writable for that user, and all your listen
calls are for ports greater than 1024 (because binding to ports <=1024 requires root privileges).
In most situations however, you run the nginx master process as root and specify the user
directive so that nginx workers processes run as that user.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With