Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Ian's Personal Short Link Bookmark Service
map $request_uri $statico_link {
include /home/ian/links.conf;
}
server {
listen 443 http2;
listen [::]:443 http2;
server_name statico.link;
root /var/www/html;
ssl on;
ssl_certificate /etc/letsencrypt/live/statico.link/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/statico.link/privkey.pem;
include /etc/nginx/cipherlist;
include /etc/nginx/letsencrypt;
add_header Referrer-Policy unsafe-url;
add_header X-Robots-Tag "noindex, nofollow";
if ($statico_link) {
return 302 $statico_link;
}
location / { return 302 https://langworth.com/; }
location /all-links.txt {
alias /home/ian/links.conf;
add_header Content-Type text/plain;
}
}
# HTTPS redirect
server {
listen 443 http2;
listen [::]:443 http2;
server_name www.statico.link;
ssl on;
ssl_certificate /etc/letsencrypt/live/www.statico.link/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/www.statico.link/privkey.pem;
include /etc/nginx/cipherlist;
location / {
return 301 https://statico.link$request_uri;
}
include /etc/nginx/letsencrypt;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.