This depends on what software you are using to reverse proxy.
I’m using Caddy and following Use Caddy instead of NGINX as your reverse proxy
Only change from the guide is adding the folder in the Caddyfile:
subfolder.muito.ninja
proxy /forum unix:/sock/nginx.http.sock {
transparent
}