nginx [emerg]: getpwnam(“www”) failed 处理办法

本文介绍如何在服务器系统中创建名为www的用户组及用户。通过使用groupadd和useradd命令实现,这对于Web服务器配置至关重要。

应该在服务器系统中添加www用户组和用户www,如下命令:

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


按上面方案二修改,添加了Dockerfile文件,内容跟上面一样,但是docker compse文件没改,重启后报:nginx 14:43:44.76 INFO ==> nginx 14:43:44.76 INFO ==> Welcome to the Bitnami nginx container nginx 14:43:44.76 INFO ==> Subscribe to project updates by watching https://github.com/bitnami/containers nginx 14:43:44.76 INFO ==> Submit issues and feature requests at https://github.com/bitnami/containers/issues nginx 14:43:44.76 INFO ==> Upgrade to Tanzu Application Catalog for production environments to access custom-configured and pre-packaged software components. Gain enhanced features, including Software Bill of Materials (SBOM), CVE scan result reports, and VEX documents. To learn more, visit https://bitnami.com/enterprise nginx 14:43:44.77 INFO ==> nginx 14:43:44.78 INFO ==> ** Starting NGINX ** 2025/10/13 14:43:44 [emerg] 16#16: getpwnam("www") failed in /opt/bitnami/nginx/conf/nginx.conf:2 nginx: [emerg] getpwnam("www") failed in /opt/bitnami/nginx/conf/nginx.conf:2 nginx 14:43:55.40 INFO ==> nginx 14:43:55.41 INFO ==> Welcome to the Bitnami nginx container nginx 14:43:55.41 INFO ==> Subscribe to project updates by watching https://github.com/bitnami/containers nginx 14:43:55.41 INFO ==> Submit issues and feature requests at https://github.com/bitnami/containers/issues nginx 14:43:55.41 INFO ==> Upgrade to Tanzu Application Catalog for production environments to access custom-configured and pre-packaged software components. Gain enhanced features, including Software Bill of Materials (SBOM), CVE scan result reports, and VEX documents. To learn more, visit https://bitnami.com/enterprise nginx 14:43:55.41 INFO ==> ln: failed to create symbolic link '/bitnami/nginx/nginx': File exists nginx 14:43:55.43 INFO ==> ** Starting NGINX ** 2025/10/13 14:43:55 [emerg] 16#16: getpwnam("www") failed in /opt/bitnami/nginx/conf/nginx.conf:2 nginx: [emerg] getpwnam("www") failed in /opt/bitnami/nginx/conf/nginx.conf:2
最新发布
10-14
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值