We operate a Shiny server and a ShinyProxy server behind an Apache server. We would like to make an ShinyProxy server app accessible under the URL my.domain.com/app/app2
The ShinyProxy server app is available on the server under port 8080 (localhost:8080)
The other Shiny apps (not ShinyProxy) should still be available under URL my.domain.com/app1, my.domain.com/app2, my.domain.com/appN
The normal Shiny server runs on port 3838 (localhost:3838)
We are struggling to find the right Apache rewrite rules for achieving the following:
my.domain.com/app1 -> localhost:3838 (Shiny server)
and
my.domain.com/app/app2 -> localhost:8080 (ShinyProxy server)
The closet we got was the with the following conditions
RewriteRule /pscapp/(.*) ws://localhost:3838/$1 [P,L]
RewriteCond %{HTTP:Upgrade} !=websocket RewriteRule /pscapp/(.*) http://localhost:3838/$1 [P,L]
ProxyPass /pacapp http://localhost:3838/ retry=1 acquire=3000 timeout=600 Keepalive=On
ProxyPassReverse /pscapp http://localhost:3838/
#ProxyRequests Off
#RewriteCond /app !-f
RewriteCond %{HTTP:Upgrade} =websocket RewriteRule /app/(.*) ws://localhost:8080/$1 [P,L]
RewriteCond %{HTTP:Upgrade} !=websocket RewriteRule /app/(.*) http://localhost:8080/$1 [P,L]
ProxyPass /app/ http://localhost:8080/ retry=1 acquire=3000 timeout=600 Keepalive=On
ProxyPassReverse /app/(.*) http://localhost:8080/app/(.*)
ProxyRequests Off
When we have restarted httpd, the Shiny server bit works fine. But the ShinyProxy bit just displayed a little contents and then stuck, i.e.:
accessing https://my.domain.com/app1 works OK
Accessing https://my.domain.com/app/app2 started the ShinyProxy docker container, but the app was not present in the browser.
Do you have any idea how we can achieve this and what is wrong?
Best regards Cheng