I have a simple problem of accessing the rstudio server remotely using my domain name. The server is accessible using the IP address i.e. x.x.x.x:8787
but as soon as I use the domain abc.net/rstudio
there is page not found message.
I can confirm the shinyapp1
is accessible with the below nginx setting. I am reproducing the nginx
config file server block of concern and would appreciate advice from people experienced in server admin.
I am sure it would be a small tweak in the config file but I am unable to get my head around this and it has baffled me now for several days.
server {
listen [::]:443 ssl ipv6only=on; # managed by Certbot
listen 443 ssl; # managed by Certbot
server_name abc.net;
ssl_certificate /etc/letsencrypt/live/abc.net/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/abc.net/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
location /shinyapp1 {
proxy_pass http://localhost:3838/shinyapp1;
proxy_redirect http://localhost:3838/shinyapp1/ $scheme://$host/shinyapp1/;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_read_timeout 20d;
proxy_buffering off;
}
location /rstudio {
proxy_pass http://localhost:8787/;
proxy_redirect http://localhost:8787/ $scheme://$host/rstudio/;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_read_timeout 20d;
proxy_buffering off;
}
}
When I try to access the rstudio with
https://abc.net/rstudio
, I get the following browser message:
also the url is immediately replaced with :
https://abc.net/rstudio/auth-sign-in?appUri=%2F
(this gives a hint that there is no firewall blocking the access)
And donot forget using the IP address I am able to access the rstudio sign in page easily, i.e.
x.x.x.x:8787
immediately opens the sign in page of rstudio.
Note: I have replaced the actual domain name by abc
to preserve privacy.