forked from exozyme/nginx
add blog.xtexx.ml
This commit is contained in:
parent
0f29483002
commit
cfe3c09e5c
1 changed files with 33 additions and 0 deletions
33
xtex.conf
Normal file
33
xtex.conf
Normal 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;
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue