server {
listen 80;
server_name www.zq27.cc zq27.cc;
root /data/wwwroot/www.zq27.cc/;
access_log off;
error_page 404 /404.html;
location /404.html {
root /data/wwwroot/www.zq27.cc/;
}
location /{
index index.html index.htm index.php;
if (-e $request_filename) {
break;
}
if (!-e $request_filename) {
rewrite ^/(.*)$ /index.php/$1 last;
break;
}
} location ~ .+\.php($|/) {
root root /data/wwwroot/www.zq27.cc/;
fastcgi_index index.php;
fastcgi_split_path_info ^(.+\.php)(.*)$;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
fastcgi_pass 127.0.0.1:9000;
# fastcgi_index index.php;
# fastcgi_param SCRIPT_FILENAME /home/www/www_phpno_com/admin_wwwroot/$fastcgi_script_name;
# fastcgi_param SCRIPT_FILENAME /usr/local/nginx/html/$fastcgi_script_name;
include fastcgi_params;
}
}

解决Nginx不支持pathinfo的问题的更多相关文章

  1. codeigniter在nginx 下支持pathinfo和去除index.php的方法

    as今天准备把网站搬迁到nginx上发现codeigniter框架在nginx上不能使用,后来发现是nginx不支持pathinfo,下面介绍怎么在nginx下开启pathinfo 开始pathinf ...

  2. nginx不支持pathinfo 导致thinkphp出错解决办法

    location / { if (!-e $request_filename) { rewrite ^(.*)$ /index.php?s=$1 last; break; } } 然后项目配置下url ...

  3. nginx不支持pathinfo函数

    server { listen ; server_name www.domain.com domain.com; error_page /.html; error_page /50x.html; lo ...

  4. [转]Nginx+ThinkPHP不支持PathInfo的解决办法

    FROM : http://www.4wei.cn/archives/1001174 应集团要求,公司的服务器全收到集团机房统一管理了,失去了服务器的管理配置权限. 杯具就此开始. 首先要解决文件大小 ...

  5. 使得nginx支持pathinfo访问模式

    原理:     任意创建一个 in.php 文件:             <?php                       echo '<pre>';             ...

  6. 最完美解决Nginx部署ThinkPHP项目的办法

    网上通用解决方法的配置如下: server { ... location / { index index.htm index.html index.php; #访问路径的文件不存在则重写URL转交给T ...

  7. nginx低版本不支持pathinfo模式,thinkphp针对此问题的解决办法

    将一个thinkphp项目从apache环境移到nginx1.2上,怎奈,nginx这个版本默认不支持pathinfo模式 首先,编辑nginx的虚拟主机配置文件 location ~ .*.(php ...

  8. 配置Nginx支持pathinfo模式

    Nginx服务器默认不支持pathinfo, 在需要pathinfo支持的程序中(如thinkphp),则无法支持”/index.php/Home/Index/index”这种网址.网上流传的解决办法 ...

  9. 使nginx支持pathinfo模式

    在将fastadmin部署到虚拟机中时,遇到如下问题:当访问登录页面时,页面进行不断的循环跳转重定向.解决方法是将nginx配置为支持pathinfo的模式 以下是nginx中的配置内容: locat ...

随机推荐

  1. Ubuntu 14.10安装SecureCRT 7.3(转)

    原文 :http://blog.csdn.net/chszs/article/details/40623169 1.软件准备 Ubuntu14.04 x64 下载SecureCRT7.3的版本:scr ...

  2. TripleDES加解密Java、C#、php通用代码

    TripleDES说明:     TripleDES(3Des)和Des都是对称加密算法,TripleDes是Des加密算法的增强版本,这里主要说的是TripleDes加密算法的应用.     工作中 ...

  3. mysql的配置文件my.cnf

    调整MySQL运行参数,修改/etc/my.cnf文件调整mysql运行参数重启MySQL后生效,在MySQL4版本以后,一部分内部变量可以在MySQL运行时设置,不过重启MySQL就失效了. mys ...

  4. mybatis执行批量更新update

    Mybatis的批量插入这里有http://ljhzzyx.blog.163.com/blog/static/38380312201353536375/.目前想批量更新,如果update的值是相同的话 ...

  5. Md5 签名算法

    /// <summary>        /// MD5签名        /// </summary>        /// <param name="pre ...

  6. cocos2d-js callFunc传参

    1.传递一个参数: pg.TestScene.prototype.init = function () { if (cc.Scene.prototype.init.call(this)) { var ...

  7. 阿里中间件——diamond

    一.前言 最近工作不忙闲来无事,仔细分析了公司整个项目架构,发现用到了很多阿里巴巴集团开源的框架,今天要介绍的是中间件diamond. 二.diamond学习笔记 1.diamond简介 diamon ...

  8. CSS实现DIV水平自适应居中

    DIV水平自适应居中 <!DOCTYPE html> <html lang="cn"> <head> <meta charset=&quo ...

  9. U盘安装WIN10专业版

    安装环境1个SSD,2个SATA盘. 安装时把2个SATA盘拔掉,并使SSD在BISO中的地位为0区的MASTER,否则安装时会出现,无法创建当前分区,和新建当前分区. 步骤:下载win10正式专业版 ...

  10. git工作中的常用操作

    上班开始,打开电脑,git pull:拉取git上最新的代码: 编辑代码,准备提交时,git stash:将自己编辑的代码暂存起来,防止git pull时与库中的代码起冲突,否则自己的代码就白敲了: ...