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. IDEA springMVC - hello world

    记录所学,防忘记... ide用IDEA,用maven管理依赖包 1.建立一个maven-webapp项目:File->New->Project 2.pom.xml <project ...

  2. CheckBox设置Enabled为False后,无法修改ForeColor

    设置CheckBox的AutoCheck为False,Enabled为True,即可解决.

  3. WCF Misconfiguration: Security Not Enabled

    Abstract: No transport or message security has been defined. Explanation: Applications that transmit ...

  4. php阻止网页被用户频繁刷新

    一般情况下,用户浏览网页的速度都是几秒十几秒甚至更长时间刷新一页,但有时候又会遇到网页被恶意快速刷新,从而导致正常用户浏览速度缓慢,如何来解决这个问题呢?可以使用如下代码来实现每ip页面访问数量限制: ...

  5. CListBox多选情况处理方法

        如ListBox的内容如下,蓝色代表选中的内容 列表  索引  删除时索引  item1 0  0  item2 1  0  item3 2    item4 3  1 删除所有选中列: vo ...

  6. GD图片(画布)的制作及验证码的应用

    创建画布:创建画布的函数有 imagecreatetruecolor(width,height);创建画布 width指画布的宽height指画布的高 imagecolorallocate(img,r ...

  7. jquery里面的名称冲突解决方法

    jQuery 使用 $ 符号作为 jQuery 的简介方式. 某些其他 JavaScript 库中的函数(比如 Prototype)同样使用 $ 符号. jQuery 使用名为 noConflict( ...

  8. (十三) [终篇] 一起学 Unix 环境高级编程 (APUE) 之 网络 IPC:套接字

    . . . . . 目录 (一) 一起学 Unix 环境高级编程 (APUE) 之 标准IO (二) 一起学 Unix 环境高级编程 (APUE) 之 文件 IO (三) 一起学 Unix 环境高级编 ...

  9. Appium移动自动化测试之问题总结

    1.运行该测试用例,报如下错误 java.lang.NoSuchMethodError: org.openqa.selenium.remote.ErrorHandler.<init>(Lo ...

  10. ABP JTable如何手动刷新子表数据

    function getSubMaster() { _$masterTable.find('.jtable-child-table-container').jtable('reload'); }