64 # pass the PHP scripts to FastCGI server listening on 127.0. 0.1:9000 65 # 66 location ~ \.php$ { 67 root html/bbs; 68 fastcgi_pass 127.0.0.1:9000; 69 fastcgi_index index.php; 70 # fastcgi_param SCRIPT_FILENAME /usr/local/nginx/html/$ fastcgi_script_name; 71 include fastcgi_params; 72 } 73 74 # deny access to .htaccess files, if Apache's document root 75 # concurs with nginx's one 76 # 77 #location ~ /\.ht { 78 # deny all; 79 #} 80 "/usr/local/nginx/conf/nginx.conf" 118L, 2667C 已写入 [root@localhost html]# nginx -t nginx: [emerg] "location" directive is not allowed here in /usr/local/nginx/conf/nginx.conf:66 nginx: configuration file /usr/local/nginx/conf/nginx.conf test failed
时间: 2024-02-10 17:20:58 浏览: 207
根据您提供的信息,Nginx在测试配置文件时出现了错误。错误消息指出,在/usr/local/nginx/conf/nginx.conf文件的第66行,“location”指令在此处不允许。这意味着在该位置应该使用其他指令。
要解决此问题,您应该检查Nginx配置文件中的语法错误,特别是在指令上。确保所有指令都在正确的位置,并且没有错误的语法或拼写错误。还可以使用Nginx的调试工具来找出错误所在。
阅读全文
相关推荐
![rar](https://img-home.csdnimg.cn/images/20241231044955.png)
![zip](https://img-home.csdnimg.cn/images/20241231045053.png)
![gz](https://img-home.csdnimg.cn/images/20210720083447.png)
![gz](https://img-home.csdnimg.cn/images/20210720083447.png)
![gz](https://img-home.csdnimg.cn/images/20210720083447.png)
![gz](https://img-home.csdnimg.cn/images/20210720083447.png)
![gz](https://img-home.csdnimg.cn/images/20210720083447.png)