全球主机交流论坛

标题: nginx重启失败咋搞 [打印本页]

作者: weilai丶    时间: 2017-7-31 12:03
标题: nginx重启失败咋搞
搞不好这个,啥也没做就重启不了了,错误提示是
  1. nginx: [emerg] "location" directive is not allowed here in /usr/local/nginx/conf/enable-php-pathinfo.conf:2
  2. nginx: configuration file /usr/local/nginx/conf/nginx.conf test failed
复制代码



enable-php-pathinfo.conf配置文件是这个
  1.         location ~ [^/]\.php(/|$)
  2.         {
  3.             fastcgi_pass  unix:/tmp/php-cgi.sock;
  4.             fastcgi_index index.php;
  5.             include fastcgi.conf;
  6.             include pathinfo.conf;
  7.         }
复制代码

有大佬知道咋搞吗,
作者: 木子李    时间: 2017-7-31 12:07
提示第二行有问题??
作者: weilai丶    时间: 2017-7-31 12:07
木子李 发表于 2017-7-31 12:07
提示第二行有问题??

大概是,就是不知道哪里有问题,啥也没做就重启不了
作者: allnetstore    时间: 2017-7-31 12:08
冤有头债有主,哪个让你把这段加在这个文件里的就找哪个去
作者: weilai丶    时间: 2017-7-31 12:10
allnetstore 发表于 2017-7-31 12:08
冤有头债有主,哪个让你把这段加在这个文件里的就找哪个去

。。啥意思大佬
作者: NoBB    时间: 2017-7-31 12:11
建议你把域名配置文件放出来。你的enable-php-pathinfo.conf事没问题的,可能是你放的位置不对。




欢迎光临 全球主机交流论坛 (https://loc.1226.eu.org/) Powered by Discuz! X3.4