1.简介
在使用nginx -t命令测试时候报错。
2.相关
nginx: the configuration file /usr/local/nginx/conf/nginx.conf syntax is ok nginx: [emerg] getpwnam("nginx") failed nginx: configuration file /usr/local/nginx/conf/nginx.conf test failed
3.步骤
创建一个nginx用户
useradd -s /sbin/nologin -M nginx
在进行测试
./sbin/nginx -t nginx: the configuration file /usr/local/nginx/conf/nginx.conf syntax is ok nginx: configuration file /usr/local/nginx/conf/nginx.conf test is successful