Server간 연결 :: NginX – Shiny
https://support.rstudio.com/hc/en-us/articles/213733868-Running-Shiny-Server-with-a-Proxy
NginX에 Reverse Proxy 설정
Before
After
Map proxy settings for RStudio
/etc/nginx/nginx.conf
/etc/nginx/nginx.conf ... http { ... map $http_upgrade $connection_upgrade { default upgrade; '' close; ... }
/etc/nginx/sites-available/default
⇒ sudo vi /etc/nginx/sites-available/default server { listen 80 default_server; listen [::]:80 default_server; #server_name yourdomain.com www.yourdomain.com; #return 301 https://$server_name$request_uri; root /var/www/html; server_name _; location / { proxy_pass http://localhost:3838; proxy_redirect http://localhost:3838/ $scheme://$host/; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection $connection_upgrade; proxy_read_timeout 20d; }
적용
⇒ sudo systemctl restart shiny-server ⇒ sudo systemctl restart nginx
참고 – Shiny server Error 상세하게
/etc/shiny-server/shiny-
sanitize_errors off;
Dropbox 내의 폴더 사용시
⇒ chmod 775 ~/Dropbox
설정 변경
⇒ vi /etc/shiny-server/shiny-server.conf
... location / { #site_dir /srv/shiny-server; site_dir /Users/onesixx/Dropbox/Rhome/lecture; ...
⇒ sudo systemctl restart shiny-server
http://localhost/
/Users/onesixx/Dropbox/Rhome/lecture/ui.R
/Users/onesixx/Dropbox/Rhome/lecture/server.R
sudo su - -c "R -e \"install.packages('rmarkdown', repos='http://cran.rstudio.com/')\""