server {
listen 8080;
server_name localhost_yaf;
root /Users/wangfayong/SVN_local/yaf/public; # 该项要修改为你准备存放相关网页的路径
index index.php index.html index.htm;
if (!-e $request_filename) {
rewrite ^/(.*\.(js|ico|gif|jpg|png|css|bmp|html|xls)$) /public/$1 last;
rewrite ^/(.*) /index.php?$1 last;
}
#proxy the php scripts to php-fpm
location ~ \.php$ {
include /usr/local/etc/nginx/fastcgi.conf;
fastcgi_intercept_errors on;
fastcgi_pass 127.0.0.1:9000;
}
}