Quantcast
Channel: Active questions tagged r - Stack Overflow
Viewing all articles
Browse latest Browse all 201839

Proxypass isn't keeping the desired URL

$
0
0

I'm using www.shinyproxy.io solution to scale a R shiny app. I have some web apps under www.mydomain.com/shiny and, for example, I can access the /register app by writing www.mydomain.com/shiny/app/register or www.mydomain.com/shiny/app_direct/register (this second version is automatically mobile ready).

I found out that the proper apache configuration to show this register app under www.mydomain.com/register seems to be:

<VirtualHost *:80>

   ServerName www.mydomain.com

<Proxy *>
    Allow from localhost
  </Proxy>


RewriteEngine on
# force HTTPS
  RewriteCond %{HTTP:X-Forwarded-Proto} !=https
  RewriteRule .* https://%{HTTP:Host}%{REQUEST_URI} [L,R=permanent]

RewriteCond %{HTTP:UPGRADE} ^WebSocket$ [NC]
RewriteCond %{HTTP:CONNECTION} ^Upgrade$ [NC]
RewriteRule .* ws://localhost:8080%{REQUEST_URI} [P]

#Reverse proxy:
ProxyPass         /shiny        http://127.0.0.1:8080/shiny
ProxyPassReverse  /shiny        http://127.0.0.1:8080/shiny


#REGISTER:
ProxyPass         /register        http://127.0.0.1:8080/shiny/app/register
ProxyPassReverse  /register        http://127.0.0.1:8080/shiny/app/register

ProxyRequests off


</VirtualHost>

When I visit www.mydomain.com/register I can see the app working fine.

But when I try to change the proxyPass /register to the app_direct like this:

ProxyPass         /register        http://127.0.0.1:8080/shiny/app_direct/register
ProxyPassReverse  /register        http://127.0.0.1:8080/shiny/app_direct/register

Now if I visit www.mydomain.com/register everything also works well, but the link in the browser changes to www.mydomain.com/shiny/app_direct/register

Does anyone know why the url changes? I want to keep the old one (www.mydomain.com/register).

Thanks in advance!


Viewing all articles
Browse latest Browse all 201839

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>