window 下 nginx+php+fastcgi 架设备忘

1、配置Php.ini
1)extension_dir = "./ext" 修改这个路径为真实的php的ext路径
2);extension=php_mysql.dll ;extension=php_mysqli.dll 开启这两个扩展
3) ;cgi.fix_pathinfo=1 开启cgi支持
2、拷贝 php根目录下文件 libmysql.dll 到c:/windows下面

3、nginx配置
server {
listen 443;
server_name localhost;
location / {
  root E:/niginxLog/www; # nginx一定要用/
  index index.php index.html index.htm;
}
location ~\.php$ {
  fastcgi_pass 127.0.0.1:9000;
  fastcgi_index index.php;
  include fastcgi_params;
}
}

4、启动php fastcgi

D:/wnmp/php5/php-cgi.exe -b 127.0.0.1:9000 -c D:/wnmp/php5/php.ini

 

posted @ 2014-03-04 20:49  EchoSong  阅读(203)  评论(0编辑  收藏  举报