在配置nginx 时提示如下错误时:
nginx: [emerg] getpwnam(“www”) failed

解决方案一

在nginx.conf中 把user nobody的注释去掉既可

解决方案二

错误的原因是没有创建www这个用户,应该在服务器系统中添加www用户组和用户www,如下命令:

1
2
/usr/sbin/groupadd -f www
/usr/sbin/useradd -g www www

以上方法测试通过,启动后,在浏览器里输入IP,即可查看到:
Welcome to nginx!的欢迎界面

nginx: [emerg] getpwnam(“www”) failed的更多相关文章

  1. nginx安装 nginx: [emerg] getpwnam(“www”) failed 错误

    inux 64系统中安装nginx1.3时如果出现错误:nginx: [emerg] getpwnam(“www”) failed解决方法1:      在nginx.conf中 把user nobo ...

  2. nginx: [emerg] getpwnam(“www”) failed错误

    linux 64系统中安装nginx时如果出现错误:nginx: [emerg] getpwnam(“www”) failed in ........解决方法1:      在nginx.conf中 ...

  3. nginx: [emerg] getpwnam("nginx") failed

    搭建LNMP环境的时候,在安装完Nginx后启动测试Nginx服务时发现报如下错误: nginx: [emerg] getpwnam("nginx") failed 这是由于没有创 ...

  4. nginx: [emerg] socket() [::]:80 failed (97: Address family not supported by protocol)

    环境:Centos6.5 行为:安装nginx 问题: nginx: [emerg] socket() [::]: failed (: Address family not supported by ...

  5. Linux启动nginx时报错nginx: [emerg] getpwnam("nginx") failed

    编译时指定了用户而没有创建用户导致报错 解决: 查看你添加的用户是什么, [root@localhost nginx]# sbin/nginx -Vnginx version: nginx/1.10. ...

  6. EasyDSS流媒体服务器Linux emerg getpwnam("xxx") failed解决办法

    本文转自EasyDarwin开源团队Alex的博客:http://blog.csdn.net/cai6811376/article/details/73770943 EasyDSS 流媒体服务器是什么 ...

  7. 阿里云ECS在CentOS 6.9中使用Nginx提示:nginx: [emerg] socket() [::]:80 failed (97: Address family not supported by protocol)的解决方法

    说明: 1.[::]:80这个是IPv6的地址. 2.阿里云截至到今天还不支持IPv6. 解决方式: 1.普通解决方式:开启IPv6的支持,不过这个方法在阿里云行不通. vim /etc/nginx/ ...

  8. check nginx配置文件错误:[emerg]: getpwnam(“nginx”) failed

    1.错误提示: [root@server include]# /application/nginx/sbin/nginx -t -c /applications/nginx/nginx/nginx.c ...

  9. [emerg]: getpwnam(“nginx”) failed

    [root@localhost nginx-1.11.2]# /usr/local/nginx/sbin/nginx nginx: [emerg] getpwnam("nginx" ...

随机推荐

  1. 每天一个linux命令(44):ifconfig命令

    许多windows非常熟悉ipconfig命令行工具,它被用来获取网络接口配置信息并对此进行修改.Linux系统拥有一个类似的工具,也就是ifconfig(interfaces config).通常需 ...

  2. nginx 配置虚拟主机

    文章转载自:http://www.ttlsa.com/html/1571.html 上篇说道我们的nginx是安装在/usr/local/nginx/ cd conf 我们现在把所有的虚拟主机放在一个 ...

  3. Java设计模式-享元模式(Flyweight)

    享元模式的主要目的是实现对象的共享,即共享池,当系统中对象多的时候可以减少内存的开销,通常与工厂模式一起使用. FlyWeightFactory负责创建和管理享元单元,当一个客户端请求时,工厂需要检查 ...

  4. tuple内部方法

    代码: #tuple内部方法 ac=('a','r','6','d','a','b','b','e') print(dir(ac)) print(ac.count('a')) print(ac.ind ...

  5. Mysql常出现的问题

    1.mysql如何导入.txt文件?load data local infile 'D:\\data.txt' into table 表名 fields terminated by '\t';2.my ...

  6. 【poj2186】 Popular Cows

    http://poj.org/problem?id=2186 (题目链接) 题意 给出一个n个点m条边的有向图,求其中没有出度强连通分量所包含的点有几个 Solution 其实这道题的题解已经在“题意 ...

  7. groovy-真值

    Boolean expressions Groovy支持标准的条件运算符的布尔表达式: 1 def a = true 2 def b = true 3 def c = false 4 assert a ...

  8. POJ 3278 The merchant

    传送门 Time Limit: 3000MS Memory Limit: 65536K Description There are N cities in a country, and there i ...

  9. HDU 2255 奔小康发大财

    传送门 Solution: KM算法 关于KM算法有一篇极好的文档http://www.cse.ust.hk/~golin/COMP572/Notes/Matching.pdf Implementat ...

  10. startx启动过程分析

    http://blog.csdn.net/hustwarhd/article/details/3069066 JiananHe 09/19/2008 目录 xinit 1.1      功能 1.2  ...