问题描述
在配置nginx的配置文件server模块的时候报如下错误:
*"location" directive is not allowed here in /usr/local/nginx/conf.d/vhost_1.conf:10*
下图是我的配置文件,乍一看没有问题
其实这些我们另外添加的模块要放在http或者server模块下才能使用
修改解决
用nginx -t来测试一下语法,发现就没有问题了
“location“ directive is not allowed here in /usr/local/nginx/conf.d/vhost_1.conf:10
最新推荐文章于 2024-04-29 20:15:05 发布