Nginx   发布时间:2022-05-11  发布网站:大佬教程  code.js-code.com
大佬教程收集整理的这篇文章主要介绍了getgrenam(“user”)在/etc/nginx/nginx.conf中失败大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。

我试图以当前用户(= ayush)运行Nginx.但是在设置user指令时出现以下错误:

Dec 11 22:26:13 manjaro Nginx[17194]: 2015/12/11 22:26:13 [emerg] 17194#0: getgrnam("ayush") Failed in /etc/Nginx/Nginx.conf:1
Dec 11 22:26:13 manjaro systemd[1]: Nginx.service: Control process exited,code=exited status=1

我的Nginx.conf:

user ayush;
worker_processes 1;

error_log  /var/log/Nginx/error.log;
events {
    worker_connections  1024;
}


http {
    include       mime.types;
    default_type  application/octet-stream;

    #access_log  logs/access.log  main;

    sendfile        on;
    keepalive_timeout  65;

    server {
        listen       80;
        server_name  localhost;


        LOCATIOn / {
            root   /code/server;
            autoindex on;
            index  index.html index.htm;
        }

        error_page   500 502 503 504  /50x.html;
        LOCATIOn = /50x.html {
            root   /usr/share/Nginx/html;
        }
    }
}

也:

ayush@manjaro ~> whoami
ayush
user指令有两个参数,即用户和组名.如果您未指定组名,则假定它与您的用户名相同.

该错误是因为组名称ayush不存在.

有关详情,请参见@L_403_0@.

大佬总结

以上是大佬教程为你收集整理的getgrenam(“user”)在/etc/nginx/nginx.conf中失败全部内容,希望文章能够帮你解决getgrenam(“user”)在/etc/nginx/nginx.conf中失败所遇到的程序开发问题。

如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。
标签: