Last active
July 28, 2016 03:53
-
-
Save txthai/c6487f9b83fe39a69d56e870fd5cd99e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
map $http_upgrade $connection_upgrade { | |
default upgrade; | |
'' close; | |
} | |
server { | |
listen 80; | |
# NOTE: replace datarecipe.com with your domain | |
server_name datarecipe.com; | |
return 301 https://$server_name$request_uri; | |
} | |
server { | |
listen 443 ssl; | |
# NOTE: replace datarecipe.com with your domain | |
server_name datarecipe.com; | |
ssl on; | |
# NOTE: replace nb.datarecipe.com with your domain | |
ssl_certificate /etc/nginx/certs/nb.datarecipe.com/fullchain.pem; | |
ssl_certificate_key /etc/nginx/certs/nb.datarecipe.com/privkey.pem; | |
ssl_trusted_certificate /etc/nginx/certs/nb.datarecipe.com/chain.pem; | |
ssl_session_timeout 5m; | |
ssl_protocols TLSv1 TLSv1.1 TLSv1.2; | |
ssl_ciphers 'EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH'; | |
ssl_prefer_server_ciphers on; | |
ssl_session_cache shared:SSL:10m; | |
location / { | |
gzip off; | |
proxy_set_header X-Forwarded-Ssl on; | |
client_max_body_size 100M; | |
proxy_connect_timeout 7d; | |
proxy_send_timeout 7d; | |
proxy_read_timeout 7d; | |
proxy_set_header Upgrade $http_upgrade; | |
proxy_set_header Connection "Upgrade"; | |
proxy_set_header Host $http_host; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_set_header X-Forwarded-Proto $scheme; | |
proxy_set_header X-Frame-Options SAMEORIGIN; | |
# NOTE: replace http://jupyter:8888 with the correct Docker container name and port | |
proxy_pass http://jupyter:8888; | |
proxy_redirect off; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment