How to redirect traffic to multiple Shiny Apps using Apache and HTTPS?

Why is redirecting using ProxyPass in apache2 causing my UI not to render properly with Shiny-Server?

<VirtualHost *:*>
 SSLEngine on

 ProxyPreserveHost On
 ProxyPass /client http://0.0.0.0:3838/ubuntu/client/
 ProxyPassReverse /client http://0.0.0.0:3838/ubuntu/client/

 ProxyPreserveHost On
 ProxyPass / http://0.0.0.0:3838/ubuntu/globalelite/
 ProxyPassReverse / http://0.0.0.0:3838/ubuntu/globalelite/

 ServerName localhost
 ServerAlias example.com
 Include /etc/letsencrypt/options-ssl-apache.conf
 SSLCertificateFile /etc/letsencrypt/live/example.com/fullchain.pem
 SSLCertificateKeyFile /etc/letsencrypt/live/example.com/privkey.pem
</VirtualHost>

So my globalelite app works perfectly. My client app does not render properly. This switches if I switch which one has nothing after the / in ProxyPass.

It's strange because both apps work perfectly with MY_IP:3838/ubuntu/client/ or MY_IP:3838/ubuntu/globalelite/.

How do I allow users to navigate to client by doing MY_IP/client and globalelite using MY_IP/globalelite?

I set up such a system a while ago and the ProxyPass section of my apache conf file is as follows

                #ProxyPreserveHost On
                ProxyPass "/Dummy" "http://0.0.0.0:3838/Dummy"
                ProxyPassReverse "/Dummy" "http://0.0.0.0:3838/Dummy"
                #ServerName localhost

                #ProxyPreserveHost On
                ProxyPassMatch "(?i)/Customer(.*)" "http://0.0.0.0:3838/Customer$1"
                ProxyPassReverse "/Customer" "http://0.0.0.0:3838/Customer"
                #ServerName localhost

                ProxyPass "/Customer_dev" "http://0.0.0.0:3838/Customer_dev"
                ProxyPassReverse "/Customer_dev" "http://0.0.0.0:3838/Customer_dev"

The differences I see are that I do not have ProxyPerserHost On and the arguments to ProxyPass are in quotes. I hope that helps. I am very much a novice with apache.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.