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?
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.
user
directive so that nginx workers processes run as that user.? Can you set user
in each .conf
which are located in separate folder fof the virtual hosts, on per sub domain? My intention is to run the proxied servers for my sub domains under unique user accounts. –
Khufu © 2022 - 2024 — McMap. All rights reserved.
user
directive will change the uid anyway. – Oldwife