Secure connection to Rstudio Server (https) not working

Hi,

I am trying to securely connect to my Rstudio server via https located at https://srv1.stats-con.com:8787, however, I get this error on Firefox: Secure Connection Failed Error code: SSL_ERROR_RX_RECORD_TOO_LONG

Connection via http://srv1.stats-con.com:8787 works connecting to Rstudio (unsecure). Connection via https://srv1.stats-con.com works, too, connecting to OPAL server (secure).

How do I have to configure my RStudio, NGINX, certificates (certbot, Lets encrypt)?

Best, Wilmar

https is configured for port 443. You should have a different subdomain (than srv1) for rstudio (like rstudio.stats-con.com) and a specific nginx config + let’s encrypt certificate as well.

Yannick

Thanks!

  1. I registered a new Typ A record of an domain address with a provider
  2. I created a certificate with certbot:

sudo certbot --nginx --cert-name stats-con.com -d srv1.stats-con.com -d rstudio1.stats-con.com

  1. I added a reverse proxy pointing to port 8787 in /etc/nginx/sites-available/default:

location / {
proxy_pass http://127.0.0.1:8787/;
proxy_set_header Host $host;
}

Works! :slight_smile: