简单配置nginx使之支持pathinfo

来源:互联网 发布:java 调用kettle job 编辑:程序博客网 时间:2024/04/29 10:03
只需要修改3个地方就可以了,亲测成功,看代码有注解
  1. location ~ \.php {    #去掉$
  2.      root          H:/PHPServer/WWW;
  3.      fastcgi_pass   127.0.0.1:9000;
  4.      fastcgi_index  index.php;
  5.      fastcgi_split_path_info ^(.+\.php)(.*)$;     #增加这一句
  6.      fastcgi_param PATH_INFO $fastcgi_path_info;    #增加这一句
  7.      fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
  8.      include        fastcgi_params;
  9. }
0 0