104 lines
3 KiB
Text
104 lines
3 KiB
Text
server {
|
|
server_name files.ari.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;
|
|
|
|
add_header Onion-Location "http://files.arija664fy4c6zhfbsytbqcbz5gcc3qjuwaz4ue6cium5c5fo2fgakyd.onion$request_uri" always;
|
|
|
|
return 301 https://$server_name$request_uri;
|
|
}
|
|
|
|
server {
|
|
server_name files.ari.lt;
|
|
|
|
http2 on;
|
|
listen 443 ssl;
|
|
listen [::]:443 ssl;
|
|
|
|
add_header Onion-Location "http://files.arija664fy4c6zhfbsytbqcbz5gcc3qjuwaz4ue6cium5c5fo2fgakyd.onion$request_uri" always;
|
|
|
|
ssl_certificate /etc/letsencrypt/live/ari.lt-0001/fullchain.pem;
|
|
ssl_certificate_key /etc/letsencrypt/live/ari.lt-0001/privkey.pem;
|
|
ssl_trusted_certificate /etc/letsencrypt/live/ari.lt-0001/chain.pem;
|
|
include /etc/nginx/snippets.d/ssl.conf;
|
|
|
|
limit_req zone=all burst=15 delay=5;
|
|
limit_req zone=allm burst=15 delay=5;
|
|
|
|
rewrite ^/git$ https://ari.lt/lh/blog.ari.lt/ permanent;
|
|
rewrite ^/git/(.*)$ https://ari.lt/lh/blog.ari.lt/$1 permanent;
|
|
|
|
location = /favicon.ico {
|
|
return 301 https://ari.lt/favicon.ico;
|
|
}
|
|
location = /sitemap.xml {
|
|
return 301 https://ari.lt/sitemap.xml;
|
|
}
|
|
location = /netlify.toml {
|
|
return 404 https://ari.lt/404.files.xyz;
|
|
}
|
|
error_page 404 https://ari.lt/404.files.xyz;
|
|
|
|
location = /files.json {
|
|
root /var/www/ari-web/blog.ari.lt;
|
|
try_files $uri =404;
|
|
}
|
|
|
|
location = /files_json_hash.txt {
|
|
root /var/www/ari-web/blog.ari.lt;
|
|
try_files $uri =404;
|
|
}
|
|
|
|
location / {
|
|
root /var/www/ari-web/files.ari.lt;
|
|
index index.html;
|
|
try_files $uri $uri/ =404;
|
|
}
|
|
}
|
|
|
|
server {
|
|
server_name files.arija664fy4c6zhfbsytbqcbz5gcc3qjuwaz4ue6cium5c5fo2fgakyd.onion;
|
|
|
|
http2 on;
|
|
listen 80;
|
|
|
|
limit_req zone=all burst=15 delay=5;
|
|
limit_req zone=allm burst=15 delay=5;
|
|
|
|
rewrite ^/git$ http://arija664fy4c6zhfbsytbqcbz5gcc3qjuwaz4ue6cium5c5fo2fgakyd.onion/lh/blog.ari.lt/ permanent;
|
|
rewrite ^/git/(.*)$ http://arija664fy4c6zhfbsytbqcbz5gcc3qjuwaz4ue6cium5c5fo2fgakyd.onion/lh/blog.ari.lt/$1 permanent;
|
|
|
|
location = /favicon.ico {
|
|
return 301 http://arija664fy4c6zhfbsytbqcbz5gcc3qjuwaz4ue6cium5c5fo2fgakyd.onion/favicon.ico;
|
|
}
|
|
location = /sitemap.xml {
|
|
return 301 http://arija664fy4c6zhfbsytbqcbz5gcc3qjuwaz4ue6cium5c5fo2fgakyd.onion/sitemap.xml;
|
|
}
|
|
location = /netlify.toml {
|
|
return 404 http://arija664fy4c6zhfbsytbqcbz5gcc3qjuwaz4ue6cium5c5fo2fgakyd.onion/404.files.xyz;
|
|
}
|
|
error_page 404 http://arija664fy4c6zhfbsytbqcbz5gcc3qjuwaz4ue6cium5c5fo2fgakyd.onion/404.files.xyz;
|
|
|
|
location = /files.json {
|
|
root /var/www/ari-web/blog.ari.lt;
|
|
try_files $uri =404;
|
|
}
|
|
|
|
location = /files_json_hash.txt {
|
|
root /var/www/ari-web/blog.ari.lt;
|
|
try_files $uri =404;
|
|
}
|
|
|
|
location / {
|
|
root /var/www/ari-web/files.ari.lt;
|
|
index index.html;
|
|
try_files $uri $uri/ =404;
|
|
}
|
|
}
|
|
|