server { listen 80; server_name localhost; index index.html index.htm index.php; autoindex on; #开启nginx目录浏览功能 autoindex_localtime on; #显示文件修改时间为服务器本地时间 root /alidata/www/public; location ~ .*\.(php|php5)?$ { #fastcgi_pass unix:/tmp/php-cgi.sock; fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; include fastcgi.conf; } location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$ { expires 30d; } location ~ .*\.(js|css)?$ { expires 1h; } include /alidata/server/nginx/conf/rewrite/default.conf;