weilai丶 发表于 2017-7-31 12:03:41

nginx重启失败咋搞

002.gif
搞不好这个,啥也没做就重启不了了,错误提示是[*]nginx: "location" directive is not allowed here in /usr/local/nginx/conf/enable-php-pathinfo.conf:2
[*]nginx: configuration file /usr/local/nginx/conf/nginx.conf test failed复制代码


enable-php-pathinfo.conf配置文件是这个
[*]      location ~ [^/]\.php(/|$)
[*]      {
[*]            fastcgi_passunix:/tmp/php-cgi.sock;
[*]            fastcgi_index index.php;
[*]            include fastcgi.conf;
[*]            include pathinfo.conf;
[*]      }
[*]复制代码
有大佬知道咋搞吗,

木子李 发表于 2017-7-31 12:07:03

提示第二行有问题??

weilai丶 发表于 2017-7-31 12:07:58

"
大概是,就是不知道哪里有问题,啥也没做就重启不了

allnetstore 发表于 2017-7-31 12:07:00

冤有头债有主,哪个让你把这段加在这个文件里的就找哪个去

weilai丶 发表于 2017-7-31 12:08:48

"
。。啥意思大佬

NoBB 发表于 2017-7-31 12:10:09

建议你把域名配置文件放出来。你的enable-php-pathinfo.conf事没问题的,可能是你放的位置不对。
页: [1]
查看完整版本: nginx重启失败咋搞