add blog.xtexx.ml

This commit is contained in:
xtex 2023-06-12 07:53:08 +08:00
parent 0f29483002
commit cfe3c09e5c
No known key found for this signature in database
GPG key ID: 978F2E760D9DB0EB

33
xtex.conf Normal file
View file

@ -0,0 +1,33 @@
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name blog.xtexx.ml;
ssl_certificate /etc/letsencrypt/live/blog.xtexx.ml/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/blog.xtexx.ml/privkey.pem;
root /srv/http/pages/xtex;
index index.html;
error_page 502 404 /404.html;
add_header Server exozyme;
# HSTS for half-year
add_header Strict-Transport-Security "max-age=15768000; includeSubDomains";
add_header Access-Control-Allow-Origin *;
location / {
try_files $uri $uri.html $uri/ =404;
}
location ~* .(eot|otf|woff|ttf|css|js)$ {
add_header Cache-Control max-age=1800;
}
location ~* .(svg|jpg|jpeg|gif|png|ico|bmp|webp)$ {
add_header Cache-Control stale-while-revalidate=604800;
}
location ~* .xml$ {
add_header Cache-Control no-cache;
}
}