Run UpSnap in a sub-path with Reverse Proxies
masterIf you need to host UpSnap on a sub-path (e.g., /upsnap-sub-path/), ensure the path ends with a trailing /. Below are examples for Caddy and Nginx.
# Caddy example
http://localhost:8091 {
handle /upsnap-sub-path/* {
uri strip_prefix /upsnap-sub-path
reverse_proxy localhost:8090
}
}# Nginx example
http {
server {
listen 8091;
server_name localhost;
location /upsnap-sub-path/ {
proxy_pass http://localhost:8090/;
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-Proto $scheme;
}
}
}