原文:linux之"server" directive is not allowed here in

配置完rewrite之后重启nginx发现如下错误 server directive is not allowed here in 原因是因为 外部配置的simple.conf没有include到nginx.conf的http 里面 修改nginx.conf之后解决 ...

2015-04-16 11:01 0 6035 推荐指数:

查看详情

nginx服务运行失败nginx: [emerg] "server" directive is not allowed here

下午一台阿里云服务器上的Nginx突然停止运行,服务失败。 journalctl -xe查看具体的报错信息其中有显示,但是没有显示是具体那个nginx的配置文件有问题 然后更进一步查看nginx的error日志 应该会有具体的显示报错位置 cat /www/server ...

Fri Aug 20 22:16:00 CST 2021 0 564
nginx: [emerg] "upstream" directive is not allowed here in .../.../.../*.conf

因为临时需要在本机搭建一个nginx服务使用,其实很简单的一个本地server,但是运行的时候就报错: 检查了我的配置文件 test.com.conf 发现也没有问题: 然后网上查了一下说是“upstream”不能再http这个block里面,于是查看了一下 ...

Sun Mar 01 08:56:00 CST 2020 0 6053
 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM