Skip to content

Instantly share code, notes, and snippets.

@GabeMeister
Created December 22, 2017 18:15
Show Gist options
  • Save GabeMeister/e132f7ac5c811b31aacdcc16c9b3be0e to your computer and use it in GitHub Desktop.
Save GabeMeister/e132f7ac5c811b31aacdcc16c9b3be0e to your computer and use it in GitHub Desktop.
################## WSGI APPS ##################
upstream answerharbor_app {
server localhost:8000 fail_timeout=0;
}
upstream timeforchristmasmusic_app {
server localhost:8003 fail_timeout=0;
}
################## ANSWER HARBOR ##################
server {
listen 80;
server_name answerharbor.com www.answerharbor.com;
return 301 https://$host$request_uri;
}
server {
listen 443 ssl;
server_name answerharbor.com www.answerharbor.com;
ssl_certificate /etc/letsencrypt/live/answerharbor.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/answerharbor.com/privkey.pem;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_prefer_server_ciphers on;
ssl_ciphers 'EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH';
location / {
include proxy_params;
proxy_pass http://answerharbor_app;
break;
}
location ~ /.well-known {
allow all;
}
}
################# TIME FOR CHRISTMAS MUSIC ##################
server {
listen 80;
server_name timeforchristmasmusic.com www.timeforchristmasmusic.com;
return 301 https://$host$request_uri;
}
server {
listen 443 ssl;
server_name timeforchristmasmusic.com www.timeforchristmasmusic.com;
ssl_certificate /etc/letsencrypt/live/timeforchristmasmusic.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/timeforchristmasmusic.com/privkey.pem;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_prefer_server_ciphers on;
ssl_ciphers 'EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH';
location / {
include proxy_params;
proxy_pass http://timeforchristmasmusic_app;
break;
}
location ~ /.well-known {
allow all;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment