index index.html index.htm index.php
server { listen 80; server_name localhost; index index.html index.htm index.php;#前后顺序有关系,越在前优先级别越高 root /app/www/default; 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 /app/server/nginx/conf/rewrite/default.conf; access_log /app/log/nginx/access/default.log; #如果的网站的根目录下 有index.html 和index.php的话会显示index.html,不会显示index.php #如果是 index index.php index.htm index.html;的话并且根目录下同时有index.html和index.php,会显示index.php
联系方式QQ:326528263 EMAIL:clnking@163.com 网名:bass 分享技术 突破难点 创新思维