Last active
November 15, 2018 14:23
-
-
Save avnerkantor/77aba4a34dddea8e6768caaceac8b0ee to your computer and use it in GitHub Desktop.
Nginx virtual host config file etc/nginx/sites-available/example.com
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
server { | |
listen 80 default_server; | |
listen [::]:80 default_server; | |
root /var/www/html; | |
index index.html index.htm index.nginx-debian.html; | |
server_name _; | |
location / { | |
try_files $uri $uri/ =404; | |
} | |
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"; | |
rewrite ^(/shiny/[^/]+)$ $1/ permanent; | |
} | |
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"; | |
} | |
} |
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
server { | |
listen 80; | |
listen [::]:80; | |
root /var/www/html; | |
server_name example.com www.example.com; | |
location / { | |
proxy_pass http://127.0.0.1:3838/example/; | |
proxy_http_version 1.1; | |
proxy_set_header Upgrade $http_upgrade; | |
proxy_set_header Connection "upgrade"; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment