M

MALA文档

MALA文档

  • 首页
  • 关于
Home 开启Nginx提供预压缩文件
文章

开启Nginx提供预压缩文件

Posted 2024-08-28 Updated 2024-08- 28
By mala
1~1 min read
server {
    listen 80;
    listen 443 ssl http2;
    server_name test.com;
    index index.php index.html index.htm default.php default.htm default.html;
    root /www/wwwroot/test.com;
 
    # ...省略了SSL和其他配置...
 
    # 开启gzip_static
    gzip_static on;
 
    # ...省略了其余配置...
 
    location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$ {
        expires 30d;
        error_log /dev/null;
        access_log /dev/null;
    }
 
    location ~ .*\.(js|css)?$ {
        expires 12h;
        error_log /dev/null;
        access_log /dev/null;
        # 也可以在特定的location块中开启gzip_static
        # gzip_static on;
    }
 
    # ...省略了日志和其他配置...
}

License:  私有
Share

Further Reading

OLDER

获取和安装分离主题文件

NEWER

Debian安装Python 3.10

Recently Updated

  • V2B还原过期用户数据
  • Epusdt支付插件
  • Mala-Pro主题对接Crisp
  • MALA-Pro 主题前端安装文档
  • MALA-Pro 主题API后端安装文档

Trending Tags

Halo

Contents

©2025 MALA文档. Some rights reserved.

Using the Halo theme Chirpy