Nginx: Proxy pass / proxy redirect to shinyproxy applications


I have created a shinyproxy app which can directly be accessed via


Now I want to set up NGNIX proxy redirection from specified url to above specific address. The location block of Nginx.conf looks like below

location /CA/Fin/ {
      rewrite ^/CA/Fin/(.*)$ /$1 break;
      proxy_pass http://localhost:8080/app_direct/fin/;
      proxy_redirect http://localhost:8080/app_direct/fin/ $scheme://$host/CA/Fin/;
      proxy_http_version 1.1;
      proxy_set_header Upgrade $http_upgrade;
      #proxy_set_header Connection $connection_upgrade;
      proxy_set_header   Connection "upgrade";      
      proxy_read_timeout 2000d;
      proxy_buffering off;

With above setting, when user put http://ip-address/CA/Fin/, the browser is actually redirecting to the shinyproxy’s app-listing page, whereas I want to get redirected directly to app.

Any pointer to setup right method to achieve the same will be highly appreciated.