Last active
June 4, 2016 07:18
-
-
Save MilesMcBain/2a72131c38c6ea5ee8ebd6a793f6c9c3 to your computer and use it in GitHub Desktop.
nginx forwarding for jupyter, rstudio
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
# You may add here your | |
# server { | |
# ... | |
# } | |
# statements for each of your virtual hosts to this file | |
server{ | |
#server_name localhost; | |
listen 80; | |
location / { | |
root /home/ubuntu/repos/mcbain.xyz/_site/; | |
} | |
location /rstudio/ { | |
proxy_pass http://127.0.0.1:8787/; | |
proxy_http_version 1.1; | |
proxy_set_header Upgrade $http_upgrade; | |
proxy_set_header Connection "upgrade"; | |
} | |
location /shiny/ { | |
proxy_pass http://127.0.0.1:3838/; | |
proxy_http_version 1.1; | |
proxy_set_header Upgrade $http_upgrade; | |
proxy_set_header Connection "upgrade"; | |
} | |
} | |
server { | |
listen 443; | |
#server_name localhost; | |
root html; | |
index index.html index.htm; | |
ssl on; | |
ssl_certificate cert.pem; | |
ssl_certificate_key key.pem; | |
ssl_session_timeout 5m; | |
ssl_protocols SSLv3 TLSv1 TLSv1.1 TLSv1.2; | |
ssl_ciphers "HIGH:!aNULL:!MD5 or HIGH:!aNULL:!MD5:!3DES"; | |
ssl_prefer_server_ciphers on; | |
location /jupyter { | |
:return 302 https://$host:8888; | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment