How can I setup App Smith docker compose behind NGINX SSL

How do I setup App smith behind reverse proxy with SSL
example.com → NGINX → location /appsmith → app smith docker at port e.g 3500


If I open port 3500 on host VM i can access app smith via http://host_ip_addr:3500 so I think app smith working ok, the problem is just NGINX routing and ssl

My NGINX setting for app smith as following
location ~/appsmith(.*)$ {
proxy_set_header Host $host;
proxy_pass http://app_smith_svr$1;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Host $host;
}

location ~/test(.*)$ {
proxy_set_header Host $host;
proxy_pass http://svr_test$1;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Host $server_name;
}

My appsmith docker as following
version: “3”
services:
appsmith:
image: Docker
container_name: appsmith
ports:
- “3500:80”
# - “8443:443”
volumes:
- ./stacks:/appsmith-stacks
restart: unless-stopped

Hello and welcome to our community! Hosting Appsmith on a sub-path is currently not supported. This feature is tracked at [Feature] Support deploying Appsmith on a sub-path instead of at `/` · Issue #3636 · appsmithorg/appsmith · GitHub, where you can upvote, subscribe and comment to get notified when it’s resolved.

Currently, we’d recommend hosting Appsmith on a subdomain, that’s dedicated only to Appsmith, and can be hosted at the / path.