nginx虚拟配置

 1 server {
 2         listen       8080;
 3         server_name  www.manihome.com ;
 4         root   "D:/WWW/mnmnh_2015";
 5         location / {
 6           if (!-e $request_filename) {
 7 
 8               rewrite  ^(.*)$  /index.php?s=$1  last;
 9 
10               break;
11 
12           }
13             index  index.html index.htm index.php;
14             #autoindex  on;
15         }
16         location ~ \.php(.*)$ {
17             fastcgi_pass   127.0.0.1:9000;
18             fastcgi_index  index.php;
19             fastcgi_split_path_info  ^((?U).+\.php)(/?.+)$;
20             fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
21             fastcgi_param  PATH_INFO  $fastcgi_path_info;
22             fastcgi_param  PATH_TRANSLATED  $document_root$fastcgi_path_info;
23             include        fastcgi_params;
24         }
25 }

 

posted @ 2015-11-21 15:26  cheungkaming  阅读(206)  评论(0编辑  收藏  举报