fdm/deploy/nginx-http.conf

32 lines
794 B
Plaintext

server {
listen 127.0.0.1:9999;
server_name localhost;
root /var/www/fdm/current;
gzip on;
gzip_vary on;
gzip_min_length 1024;
gzip_comp_level 5;
gzip_types application/octet-stream application/json text/plain text/css application/javascript;
access_log /var/log/nginx/fdm-static-access.log;
location / {
try_files $uri $uri/ =404;
add_header Cache-Control "no-cache";
}
location /assets/ {
try_files $uri =404;
add_header Cache-Control "public, max-age=31536000, immutable";
}
}
server {
listen 80;
listen [::]:80;
server_name odacm.cn;
location /.well-known/acme-challenge/ {
root /var/lib/letsencrypt;
}
location / {
return 308 https://odacm.cn$request_uri;
}
}