记在这里,以后配置起来更方便..
server { listen 80; server_name www.yaf.com; index index.php index.html index.htm; root /data0/htdocs/www.yaf.com; location ~ .*\.(php|php5)?$ { #fastcgi_pass unix:/tmp/php-cgi.sock; fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; include fcgi.conf; } if (!-e $request_filename) { rewrite ^/(.*\.(js|ico|gif|jpg|png|css|bmp|html|xls)$) /$1 last; rewrite ^/(.*) /index.php?$1 last; } }