I want to start nginx with non-root permissions but the error failed (13: Permission denied). According to the information found on the Internet, I need to modify #user nobody in nginx.conf to: user root, and then reload it. But I follow I did it, but the error still failed (13: Permission denied). How to solve this? Another way is to give a 755 permission, but I am not allowed to use this method. Please guide me, thank you
我想大声告诉你2017-06-17 09:18:20
Non-root users cannot listen to ports below 1024.
Only two options:
nginx.conf configuration user nobody; listen <1024+>;
nginx.conf configures user nobody; listen 80; , and then starts it as root in the startup script or service. The worker will run as user nobody, and the master will run as root.
女神的闺蜜爱上我2017-06-17 09:18:20
Services on ports below 1024 require root privileges to start.
If you want to use an ordinary user to start, it is recommended to configure a sudo permission for the ordinary user.