Nginx常用配置笔记
Saturday, September 15, 2018
防止恶意解析 server { listen 80 default_server; server_name _; return 403; } server { listen 443 default_server; server_name _; ssl on; ssl_certificate cert/fullchain.pem; ssl_certificate_key cert/privkey.pem; return 403; } 开启压缩 gzip on; gzip_min_length 1k; gzip_buffers 4 16k; gzip_http_version 1.1; gzip_comp_level 5; gzip_types text/plain application/javascript application/x-javascript text/javascript text/css application/xml image/jpeg image/gif image/png; gzip_vary on; gzip_proxied expired no-cache no-store private auth; gzip_disable "MSIE [1-6]\."; 去掉…