From cfe3c09e5ca32ec955c9d31bd512f6adf6bc913b Mon Sep 17 00:00:00 2001 From: xtex Date: Mon, 12 Jun 2023 07:53:08 +0800 Subject: [PATCH] add blog.xtexx.ml --- xtex.conf | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 xtex.conf diff --git a/xtex.conf b/xtex.conf new file mode 100644 index 0000000..f8911d6 --- /dev/null +++ b/xtex.conf @@ -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; + } +}