nginx启动报错

nginx启动的时候报错

nginx: [emerg] invalid number of arguments in "root" directive in /etc/nginx/nginx.conf:45

检查一下 nginx.conf

include conf.d/b.conf;
include conf.d/c.conf;
include conf.d/a.conf
include conf.d/d.conf

发现少了分号。。。。。。

加上之后重启 nginx 即可

# nginx -t    //检测有没有错误
# nginx -s -reload
原文地址:https://www.cnblogs.com/lyc94620/p/11825346.html