90 lines
2.5 KiB
Text
90 lines
2.5 KiB
Text
server {
|
|
server_name blog.t1nklas.lt;
|
|
|
|
http2 on;
|
|
listen 80;
|
|
listen [::]:80;
|
|
|
|
limit_req zone=all burst=5 delay=5;
|
|
limit_req zone=allm burst=5 delay=5;
|
|
|
|
include /etc/nginx/snippets.d/paranoia-headers.conf;
|
|
|
|
return 301 https://$server_name$request_uri;
|
|
}
|
|
|
|
server {
|
|
server_name blog.t1nklas.lt;
|
|
|
|
http2 on;
|
|
listen 443 ssl;
|
|
listen [::]:443 ssl;
|
|
|
|
limit_req zone=all burst=15 delay=5;
|
|
limit_req zone=allm burst=15 delay=5;
|
|
|
|
# access_log on;
|
|
|
|
ssl_certificate /etc/letsencrypt/live/blog.t1nklas.lt/fullchain.pem;
|
|
ssl_certificate_key /etc/letsencrypt/live/blog.t1nklas.lt/privkey.pem;
|
|
ssl_trusted_certificate /etc/letsencrypt/live/blog.t1nklas.lt/chain.pem;
|
|
include /etc/nginx/snippets.d/ssl.conf;
|
|
|
|
add_header Strict-Transport-Security "max-age=63072000; includeSubDomains; preload" always;
|
|
add_header X-Frame-Options "deny" always;
|
|
add_header X-Content-Type-Options "nosniff" always;
|
|
add_header Content-Security-Policy "upgrade-insecure-requests" always;
|
|
add_header X-Permitted-Cross-Domain-Policies "none" always;
|
|
add_header Referrer-Policy "no-referrer" always;
|
|
|
|
include /etc/nginx/snippets.d/gzip.conf;
|
|
|
|
rewrite ^/git$ https://github.com/t1nklas/blog.t1nklas.lt permanent;
|
|
rewrite ^/git/(.*)$ https://github.com/t1nklas/blog.t1nklas.lt/$1 permanent;
|
|
|
|
location = /netlify.toml {
|
|
return 404 /;
|
|
}
|
|
location = /favicon.ico {
|
|
return 404 /;
|
|
}
|
|
|
|
error_page 404 /;
|
|
|
|
location = /rss.xml {
|
|
types {}
|
|
default_type application/rss+xml;
|
|
root /home/t1nklas/www/blog.t1nklas.lt;
|
|
try_files $uri =404;
|
|
}
|
|
|
|
location = /blog.json {
|
|
root /home/t1nklas/www/blog.t1nklas.lt;
|
|
include /etc/nginx/snippets.d/global-resource.conf;
|
|
try_files $uri =404;
|
|
}
|
|
|
|
location = /blog_json_hash.txt {
|
|
root /home/t1nklas/www/blog.t1nklas.lt;
|
|
include /etc/nginx/snippets.d/global-resource.conf;
|
|
try_files $uri =404;
|
|
}
|
|
|
|
location = /recents_json_hash.txt {
|
|
root /home/t1nklas/www/blog.t1nklas.lt;
|
|
include /etc/nginx/snippets.d/global-resource.conf;
|
|
try_files $uri =404;
|
|
}
|
|
|
|
location = /recents.json {
|
|
root /home/t1nklas/www/blog.t1nklas.lt;
|
|
include /etc/nginx/snippets.d/global-resource.conf;
|
|
try_files $uri =404;
|
|
}
|
|
|
|
location / {
|
|
root /home/t1nklas/www/blog.t1nklas.lt;
|
|
index index.html;
|
|
try_files $uri $uri/ =404;
|
|
}
|
|
}
|