nginx+php_win版配置小记

默认设置下虚拟主机配置:

   1: server {

   2:         listen       80;

   3:         server_name  xxxxxx.com www.xxxxxxx.com;

   4:         location / {

   5:             root   x:/xxx/xxx/xxx;

   6:             index  index.php;

   7:         }

   8:         error_page   500 502 503 504  /50x.html;

   9:         location = /50x.html {

  10:         root html;

  11:         }

  12:                 location ~ .php$ {

  13:             root           d:/xxxxxx;

  14:             fastcgi_pass   127.0.0.1:9000;

  15:             fastcgi_index  index.php;

  16:             fastcgi_param  SCRIPT_FILENAME $document_root$fastcgi_script_name;

  17:             include        fastcgi_params;

  18:             }

  19:         include path_info;

  20:     }

其中fastcgi_param  SCRIPT_FILENAME $document_root$fastcgi_script_name;是修改的配置

阅读更多