记在这里,以后配置起来更方便..
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; } }
版权声明:本文为iteye_20905原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。