Run shinyproxy and shiny-server uinder the same nginx config

my current config is like this

http {

map $http_upgrade $connection_upgrade {
default upgrade;
‘’ close;
}

server {
server_name ..***;
location / {
root /var/www/html;
index index.html;
}

rewrite ^/shiny$ $scheme://$http_host/shiny/ permanent;

location /shiny/ {
  rewrite ^/shiny/(.*)$ /$1 break;
  proxy_pass http://localhost:3838;
  proxy_redirect off;
  proxy_http_version 1.1;
  proxy_set_header Upgrade $http_upgrade;
  proxy_set_header Connection $connection_upgrade;
  proxy_read_timeout 20d;
  proxy_buffering off;
}

rewrite ^/shinyproxy$ $scheme://$http_host/shinyproxy/ permanent;

location /shinyproxy/ {
  rewrite ^/shinyproxy/(.*)$ /$1 break;
  proxy_pass http://localhost:9091;
  proxy_redirect off;
  proxy_http_version 1.1;
  proxy_set_header Upgrade $http_upgrade;
  proxy_set_header Connection $connection_upgrade;
  proxy_read_timeout 20d;
  proxy_buffering off;
}

listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/***.***.***/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/***.***.***/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot

}

but I cant access shinyproxy for whatever reason.