php nginx pathinfo支持配置

nginx path_info支持,php path_info,nginx pathinfo,nginx下安装php168,根据以下配置,就能很方便地在nginx上安装配置php168了,linux+nginx+php+php168,

环境:
Centos 5.5 x86_64
php 5.2.10
nginx 0.8.x

修改nginx主机配置文件:

[php]

server {
listen       80;
server_name  gaojinbo.com;
location / {
root   /var/www/gaojinbo.com;
index  index.html index.htm index.php;
}
location ~ ^(.+\.php)(.*)$ {
root   /var/www/gaojinbo.com;
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;
include fastcgi_params;
}
[/php]

复制的时候注意编码:)
完成!

还没有评论,快来抢沙发!

发表评论

  • 😉
  • 😐
  • 😡
  • 😈
  • 🙂
  • 😯
  • 🙁
  • 🙄
  • 😛
  • 😳
  • 😮
  • emoji-mrgree
  • 😆
  • 💡
  • 😀
  • 👿
  • 😥
  • 😎
  • ➡
  • 😕
  • ❓
  • ❗
  • 65 queries in 0.403 seconds