VPS侦探论坛

 找回密码
 注册
查看: 5139|回复: 6

enable-php-pathinfo.conf出了问题,请问军哥怎么恢复。

[复制链接]
发表于 2018-10-15 23:10:30 | 显示全部楼层 |阅读模式

enable-php-pathinfo.conf出了问题,请问怎么恢复。
Starting nginx... nginx: [emerg] "location" directive is not allowed here in /usr/local/nginx/conf/vhost/enable-php-pathinfo.conf:2
failed
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
发表于 2018-10-16 08:28:50 | 显示全部楼层


只要没动过 enable-php-pathinfo.conf 肯定不是 enable-php-pathinfo.conf 的问题,你自己看看你虚拟主机 enable-php-pathinfo.conf 前后的配置
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
 楼主| 发表于 2018-10-16 08:38:30 | 显示全部楼层

location /
{
    try_files $uri $uri/ /index.php?$args;
}   
    location ~ [^/]\.php(/|$)
        {
            fastcgi_pass  unix:/tmp/php-cgi.sock;
            fastcgi_index index.php;
            fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
            fastcgi_param PATH_INFO $request_uri;
            include fastcgi.conf;
            include pathinfo.conf;
        }


是上面这些代码
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
发表于 2018-10-16 17:38:56 | 显示全部楼层



都 enable-php-pathinfo.conf  了,再加上pathinfo的代码不是多此一举了
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
 楼主| 发表于 2018-10-16 19:50:35 | 显示全部楼层

看来是这里错了,马上改回来看看,顺便问一下如何单独卸载和安装nginx

军哥运维代购:http://shop63846532.taobao.com/

 楼主| 发表于 2018-10-16 20:45:12 | 显示全部楼层

去掉了        fastcgi_param PATH_INFO $request_uri;还是不行,请教军哥怎么单独卸载neginx然后再重装的方法
发表于 2018-10-17 13:07:42 | 显示全部楼层

回复 6# 的帖子


整段location,要不你就贴出完整配置文件看看
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|VPS侦探 ( 鲁ICP备16040043号-1 )

GMT+8, 2024-9-23 13:28 , Processed in 0.027528 second(s), 16 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表