码迷,mamicode.com
首页 > 其他好文 > 详细

nginx虚拟配置

时间:2015-11-21 15:47:14      阅读:120      评论:0      收藏:0      [点我收藏+]

标签:

 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 }

 

nginx虚拟配置

标签:

原文地址:http://www.cnblogs.com/CHEUNGKAMING/p/4983807.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!