win7 下ngnix +cakephp配置

location / {
root D:/PHP/zhiku/web/code/trunks/app/webroot;
index index.php index.html index.htm;
try_files $uri $uri/ /index.php?$uri&$args;
if (-f $request_filename) {
break;
}
if (!-f $request_filename) {
rewrite ^/(.+)$ /index.php?url=$1 last;
break;
}
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
location ~ \.php$ {
root D:/PHP/zhiku/web/code/trunks/app/webroot;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME D:/PHP/zhiku/web/code/trunks/app/webroot$fastcgi_script_name;
#fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}

你可能感兴趣的:(nginx)