server {
listen 80;
server_name icobak.cn;
#access_log logs/_access.log;
#error_log log/_error.log;
set $public_root E:\phper\code;
root $public_root;
index index.html index.php;
if (!-e $request_filename) {
rewrite ^/(.*) /index.php?$1 last;
}
location ~ /.svn/ {
root $public_root;
deny all;
}
location / {
root $public_root;
index index.html index.php;
client_max_body_size 10m;
}
location ~ \.php$ {
root $public_root;
index index.php;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME
$document_root$fastcgi_script_name;
include fastcgi_params;
}
}
原文:http://jinliang.blog.51cto.com/8981814/1902632