Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
The Nginx config to serve redirects from my old nchlswhttkr.com domain
server {
listen 443 ssl http2;
server_name nchlswhttkr.com;
ssl_certificate /home/nicholas/nchlswhttkr.com.certificate;
ssl_certificate_key /home/nicholas/nchlswhttkr.com.key;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_prefer_server_ciphers on;
ssl_ciphers 'EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH';
return 301 https://nicholas.cloud$request_uri;
}
# Enforce HTTPS
server {
listen 80;
server_name nchlswhttkr.com;
return 301 https://nchlswhttkr.com$request_uri;
}
# Redirect blog.nchlswhttkr.com/* to nchlswhttkr.com/blog/*
server {
listen 80;
listen 443 ssl;
ssl_certificate /home/nicholas/nchlswhttkr.com.certificate;
ssl_certificate_key /home/nicholas/nchlswhttkr.com.key;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_prefer_server_ciphers on;
ssl_ciphers 'EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH';
server_name blog.nchlswhttkr.com;
return 301 https://nchlswhttkr.com/blog$request_uri;
}
# Redirect resume.nchlswhttkr.com to nchlswhttkr.com/resume
server {
listen 80;
listen 443 ssl;
ssl_certificate /home/nicholas/nchlswhttkr.com.certificate;
ssl_certificate_key /home/nicholas/nchlswhttkr.com.key;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_prefer_server_ciphers on;
ssl_ciphers 'EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH';
server_name resume.nchlswhttkr.com;
return 301 https://nchlswhttkr.com/resume/;
}
server {
listen 80;
listen 443 ssl;
ssl_certificate /home/nicholas/nchlswhttkr.com.certificate;
ssl_certificate_key /home/nicholas/nchlswhttkr.com.key;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_prefer_server_ciphers on;
ssl_ciphers 'EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH';
server_name source.nchlswhttkr.com;
return 301 https://github.com/nchlswhttkr/website/;
}
server {
listen 80;
listen 443 ssl;
ssl_certificate /home/nicholas/nchlswhttkr.com.certificate;
ssl_certificate_key /home/nicholas/nchlswhttkr.com.key;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_prefer_server_ciphers on;
ssl_ciphers 'EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH';
server_name barhack.nchlswhttkr.com;
return 301 https://github.com/nchlswhttkr/barhack/;
}
# Redirect WWW traffic to root domain
server {
listen 80;
listen 443 ssl;
ssl_certificate /home/nicholas/nchlswhttkr.com.certificate;
ssl_certificate_key /home/nicholas/nchlswhttkr.com.key;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_prefer_server_ciphers on;
ssl_ciphers 'EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH';
server_name www.nchlswhttkr.com;
return 301 https://nchlswhttkr.com$request_uri;
}
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.