做LNMP实验中的PHP设置完测试页面重启nginx时发现重不不成用nginx -t检测说如下原因
nginx: [emerg] “location” directive is not allowed here in /usr/local/nginx/conf/:72
解决办法 原来是我之前做虚拟主机基于IP地址端口号时没有把配置文件改过来,就直接去把之前做的实验更改一下在重启就好了
相关文章
- Nginx启动报错:"location" directive is not allowed here in D:\nginx-1.16.1/conf/:63
- nginx: [emerg] “location“ directive is not allowed here in /usr/local/nginx/conf/:72
- nginx: [emerg] “location“ directive is not allowed here
- nginx: [emerg] "server" directive is not allowed here in /usr/local/nginx/conf/:48
- nginx: [emerg] “location“ directive is not allowed here in /usr/local/nginx/conf/:41
- 阿里云centOS7.4 nginx: [emerg] "server" directive is not allowed here in /etc/nginx/vhost/xxxxxx.conf:2
- nginx: [emerg] directive "location" has no opening "{" in /usr/local/nginx//conf/nginx.conf:75