配置如下:

在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;
}

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-02-27
  • 2021-11-23
  • 2021-11-20
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-05-03
  • 2022-12-23
  • 2022-03-05
  • 2022-12-23
  • 2022-01-07
  • 2022-12-23
  • 2021-05-19
相关资源
相似解决方案