I am trying to set up an Apache2 proxy server on a host that serves Tomcat webapps, a Shiny server, and RStudio server. Apache is set up to redirect http to https, and all of my proxy settings are in the default-ssl.conf file, shown below.
Proxies to Tomcat (using ajp_13) work fine.
Proxy to Shiny server mostly works correctly, as long as the address is typed into the address bar. The same address, if clicked or pasted, drops the "shiny" portion. (e.g. https:// my.host.com/shiny/users/me/hello becomes https:// my.host.com/users/me if I click or paste,but works if I type it out.)
Proxying to rstudio-server - well, if I type in the host address followed by /rstudio, it immediately redirects to the host address followed by auth-sign-in (rather than /rstudio/auth-sign-in). If I type in the full path to auth-sign-in, I can sign in, but then it redirects to the base server address rather than /rstudio. If I then type in the base address followed by /rstudio, I get rstudio, and it works fine from then on.
Here is my config: (note - spaces in the addresses are because I'm a new user and it won't let me have more than two "links" in my post.)
I know I can solve this with virtual servers, but if possible I'd really like it to work without. If anyone can steer me in the right direction, I'd really appreciate it.
I find the line Header edit Location ^/ /rstudio/ odd. Such a line is only mentioned in the documentation for Shiny Server, not foir RStudio Server. I have not need this line in similar configs in the past, so I would try to remove it.
I have tried both with and without that line - oddly it appears to have no effect whatsoever on the behavior of either server.
Also, those documents were where I started my journey. I got shiny working first by following the instructions from the second link, then added rstudio-server and that's when the problems started. I'm clearly missing something but I can't see what it is. I've tried various combinations of suggestions from Stack and the Apache mod-rewrite and mod-proxy documentation. It seems crazy to me that these two servers wouldn't work together on the same system - and in fact, I know they do because I've used them on the same system before. I didn't install them on that system, though, and don't have it around any more for reference.
The proxy-html.conf is taken from your config but with actual hostnames instead of localhost, since with docker-compose it will look as if RStudio Server and Shiny Server are running on different hosts: