• 简单配置nginx使之支持pathinfo


    配置nginx.conf

    location ~ .php {   注意 一定要去掉$

     #去掉$     root          H:/PHPServer/WWW;   

     fastcgi_pass   127.0.0.1:9000;     

    fastcgi_index  index.php;     

    fastcgi_split_path_info ^(.+.php)(.*)$;     

    #增加这一句    fastcgi_param PATH_INFO $fastcgi_path_info;    

    #增加这一句    fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;     

    include        fastcgi_params; }

    -----------------------------------

    location / {
    root /web/html;
    index index.php index.html index.htm;
    }

    location ~ .php {
    root /web/html;
    fastcgi_pass 127.0.0.1:9000;
    fastcgi_index index.php;

    fastcgi_split_path_info ^(.+.php)(.*)$;
    fastcgi_param PATH_INFO $fastcgi_path_info;

    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    include fastcgi_params;
    }

  • 相关阅读:
    文字标签和注释标签
    HTML文档的组成和标签的规范
    HTML概述
    javaWeb
    web开发的三层架构
    ASCII码表
    JDK的新特性
    Editplus的运行JAVA的配置
    Eclipse的断点调试
    Eclipse工作空间的基本配置
  • 原文地址:https://www.cnblogs.com/yaoyao1556/p/5091527.html
Copyright © 2020-2023  润新知