nginx 配置使用index.php作为目录的默认加载文件
配置如下:
在server增加一行:
index index.php index.html index.htm default.php default.htm default.html
增加后如下:
server { listen 100; index index.php index.html index.htm default.php default.htm default.html; root /www/wwwroot/manager/public; include enable-php-70.conf; if (!-e $request_filename) { rewrite ^/(.+)$ /index.php last; } location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$ { expires 30d; } location ~ .*\.(js|css)?$ { expires 1h; } location /.git { deny all; return 403; } access_log /www/wwwlogs/manager.com.log; error_log /www/wwwlogs/manager.com.error.log; }
博客里大都是转载的内容,其目的主要用户知识的组织和管理。

浙公网安备 33010602011771号