Changing the user that nginx worker processes run under (Ubuntu 12.04)

老子叫甜甜 提交于 2019-12-03 09:43:27
deagh

As long as your new user (nginx in your case) has the proper rights, everything should work.

You have to change your user setting in nginx.conf

...
user nginx;
...

and restart/reload your server. Link to docs.

shumz

If you use PHP5-FPM and get a 502 error after restart nginx, take a look on /var/run/php5-fpm.sock (Debian) :

root@ns353941:/var/run# chown nginx:www php5-fpm.sock

In my case :

nginx = new nginx user

www = group for web

nginx user belong to www, obviously.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!