Will I get away with doing the following in /etc/httpd/conf.d ?
<VirtualHost 136.x.x.x:443>
ServerName my-server.com
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
#RStudio redirect
RedirectMatch permanent ^/rstudio$ /rstudio/
RewriteEngine on
RewriteCond %{HTTP:Upgrade} =websocket
RewriteRule /rstudio/(.*) ws://localhost:8787/$1 [P,L]
RewriteCond %{HTTP:Upgrade} !=websocket
RewriteRule /rstudio/(.*) http://localhost:8787/$1 [P,L]
SSLEngine on
SSLProxyEngine On
SSLCertificateFile /etc/letsencrypt/live/my-server.com/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/my-server.com/privkey.pem
ProxyRequests Off
ProxyPreserveHost On
ProxyPass /rstudio/ http://localhost:8787/
ProxyPassReverse /rstudio/ http://localhost:8787/
</VirtualHost>