nginx: [emerg] “server” directive is not allowed here in …
在nginx.conf中配置增加sever配置或者添加虚拟主机配置文件后
出现报错:nginx: [emerg] “server” directive is not allowed here in …
原因为原因是Server{}
放http{}
外面了,应该放在http{}
里面:
http{
sever{
}
}
如果是添加虚拟主机配置文件后报错,检查include vhost/*.conf;
在nginx.conf中的位置是否在http{}
内
http{
include vhost/*.conf;
}
版权声明:本文为下一朵云发布文章,转载请附上原文出处链接和本声明。
本文链接:https://www.orcy.net.cn/1748.html
广告:HCIE-Security认证课程辅导资料(付费)
本文链接:https://www.orcy.net.cn/1748.html
广告:HCIE-Security认证课程辅导资料(付费)
发表评论