Files
shop-platform/docker/nginx/default.conf
2025-10-28 18:23:50 +08:00

41 lines
2.9 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#include luawaf.conf; # 可选Lua防火墙配置当前被注释
include conf.c/proxy.conf; # 引入反向代理或公共设置
# server_names_hash_bucket_size 512; # server_name哈希桶大小影响域名匹配性能
# client_header_buffer_size 32k; # 单个请求头的缓冲区大小
# large_client_header_buffers 4 32k; # 用于大请求头的缓冲区数量与大小
# client_max_body_size 50m; # 客户端请求体最大尺寸(上传限制)
# sendfile on; # 启用高效文件传输sendfile
# tcp_nopush on; # 优化TCP以减少分片与sendfile配合
# keepalive_timeout 60; # keep-alive连接超时时间
# tcp_nodelay on; # 关闭Nagle算法以减少小包延迟
# fastcgi_connect_timeout 300; # FastCGI连接超时
# fastcgi_send_timeout 300; # 发送给FastCGI的超时
# fastcgi_read_timeout 300; # 从FastCGI读取响应的超时
# fastcgi_buffer_size 64k; # FastCGI响应头缓冲区大小
# fastcgi_buffers 4 64k; # FastCGI响应的缓冲区数量和单个大小
# fastcgi_busy_buffers_size 128k; # FastCGI忙时缓冲区总大小避免磁盘写入
# fastcgi_temp_file_write_size 256k; # 写入临时文件前允许的阈值大小
# fastcgi_intercept_errors on; # 由nginx处理后端返回的错误页面
# gzip on; # 启用gzip压缩响应
# gzip_min_length 1k; # 小于该长度的响应不做压缩
# gzip_buffers 4 16k; # gzip压缩时使用的缓冲区数量与大小
# gzip_http_version 1.1; # 最低支持的HTTP版本以启用gzip
# gzip_comp_level 2; # gzip压缩级别1-9数值越大CPU越高
# gzip_types text/plain application/javascript application/x-javascript text/javascript text/css application/xml; # 要压缩的内容类型
# gzip_vary on; # 添加Vary: Accept-Encoding头以支持缓存代理
# gzip_proxied expired no-cache no-store private auth; # 在代理情况下是否对响应进行gzip
# gzip_disable "MSIE [1-6]\."; # 对老旧IE浏览器禁用gzip
# limit_conn_zone $binary_remote_addr zone=perip:10m; # 基于客户端IP的连接数限制共享内存区
# limit_conn_zone $server_name zone=perserver:10m; # 基于server_name虚拟主机的连接数限制共享内存区
# server_tokens off; # 禁止在响应和错误页中显示nginx版本
# access_log off; # 关闭访问日志(可根据需求启用)
include sites-enabled/*.conf; # 引入启用的站点(虚拟主机)配置