Nginx 配置生成器
为静态站点、反向代理和 SSL 生成 Nginx 配置
gzip on;
gzip_types text/plain text/css application/json application/javascript text/xml application/xml;
server {
listen 80;
server_name example.com www.example.com;
root /var/www/html;
index index.html index.htm;
location / {
try_files $uri $uri/ /index.html;
}
location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg|woff|woff2|ttf)$ {
expires 1y;
add_header Cache-Control "public, immutable";
}
}常见问题
Comments & Feedback
Comments are powered by Giscus. Sign in with GitHub to leave a comment.