魏长东

weichangdong

yaf nginx配置

server {
root /var/www/yaf/public;
index index.php index.html;

server_name yaf.com;
error_log logs/sso_error.log;

location = /favicon.ico {
log_not_found off;
}

if (!-e $request_filename) {
rewrite ^/(.*\.(js|ico|gif|jpg|png|css|bmp|html|xls)$) /public/$1 last;
rewrite ^/(.*) /index.php?$1 last;
}


location /status {
stub_status on;
access_log off;
}

location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
{
expires 30d;
}

location ~ .*\.(js|css)?$
{
expires 12h;
}



location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
} 

}