Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
108 lines (82 sloc) 2.36 KB
#
# *.hasacdn.net: Serves static assets in the format:
#
# https://[SITE].hasacdn.net/[DATE]/path/to/file.ext
#
server {
listen 80;
server_name hasacdn.net www.hasacdn.net i.hasacdn.net;
location "/" {
rewrite ^(.*) https://i.hasacdn.net$1 permanent;
}
access_log off;
error_log /dev/null crit;
}
server {
listen 443 ssl;
server_name hasacdn.net www.hasacdn.net i.hasacdn.net;
# SSL
ssl_certificate /home/mkwst/.ssh/hasacdn.net.wildcard.crt;
ssl_certificate_key /home/mkwst/.ssh/hasacdn.net.key;
# HTTPS Only
add_header Strict-Transport-Security max-age=604800;
root /home/mkwst/public_html/hasacdn.net/public;
access_log off;
error_log /dev/null crit;
}
# CDN for mikewest.org. SSL only.
server {
listen 80;
server_name mikewestdotorg.hasacdn.net;
location "/" {
rewrite ^(.*) https://mikewestdotorg.hasacdn.net$1 permanent;
}
}
server {
listen 443 ssl;
server_name mikewestdotorg.hasacdn.net;
# SSL
ssl_certificate /home/mkwst/.ssh/hasacdn.net.wildcard.crt;
ssl_certificate_key /home/mkwst/.ssh/hasacdn.net.key;
# HTTPS Only
add_header Strict-Transport-Security max-age=604800;
root /home/mkwst/public_html/mikewest.org/public/static;
access_log off;
error_log /dev/null crit;
location / {
expires max;
add_header Vary "Accept-Encoding";
if (-f $request_filename) {
break;
}
rewrite ^/\d+/(.*) /$1 break;
}
}
# CDN for w15y.com. SSL only.
server {
listen 80;
server_name w15ydotcom.hasacdn.net;
location "/" {
rewrite ^(.*) https://w15ydotcom.hasacdn.net$1 permanent;
}
}
server {
listen 443 ssl;
server_name w15ydotcom.hasacdn.net;
# SSL
ssl_certificate /home/mkwst/.ssh/hasacdn.net.wildcard.crt;
ssl_certificate_key /home/mkwst/.ssh/hasacdn.net.key;
# HTTPS Only
add_header Strict-Transport-Security max-age=604800;
root /home/mkwst/public_html/w15y.com/public/static;
access_log off;
error_log /dev/null crit;
location / {
add_header Expires "Thu, 31 Dec 2037 23:55:55 GMT";
add_header Cache-Control "public, max-age=315360000";
if (-f $request_filename) {
break;
}
rewrite ^/\d+/(.*) /$1 break;
}
}