更改要在其下运行nginx worker进程的用户(Ubuntu 12.04) [英] Changing the user that nginx worker processes run under (Ubuntu 12.04)

查看:387
本文介绍了更改要在其下运行nginx worker进程的用户(Ubuntu 12.04)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Ubuntu 12.04上手动安装了nginx.当我运行./configure时,我使用了以下选项:

I have a manual install of nginx on Ubuntu 12.04. When I ran ./configure I used the following options:

./configure --user=www-data --group=www-data --with-http_ssl_module --with-http_realip_module

现在,nginx工作进程在www-data组中的www-data用户下运行.但是,我希望将其更改为其他用户(在我的情况下称为nginx).

Now the nginx worker processes run under the www-data user in the www-data group. However, I wish to change this to a different user (called nginx in my case).

已经运行makemake install之后可以这样做吗?

Is this possible to do after running make and make install already?

任何帮助将不胜感激.

推荐答案

只要您的新用户(在您的情况下为 nginx )具有适当的权限,一切都应正常工作.

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

您必须在 nginx.conf

...
user nginx;
...

,然后重新启动/重新加载服务器. 链接到文档.

and restart/reload your server. Link to docs.

这篇关于更改要在其下运行nginx worker进程的用户(Ubuntu 12.04)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆