Skip to content
Senan Kelly edited this page Oct 19, 2025 · 6 revisions

for path routing, gonic supports a proxy-prefix config file option, env var, or command line argument

for example with GONIC_PROXY_PREFIX=gonic

nginx (path routing)

location /gonic {
    rewrite ^/gonic(/.*)$ $1 break;
    proxy_pass http://localhost:4747;
    # set "Secure" cookie if using HTTPS
    proxy_cookie_path / "/; Secure";
    # set "X-Forwarded-Host" header for last.fm connection callback
    proxy_set_header X-Forwarded-Host $host;
}

apache (path routing)

<Location "/gonic" >
    ProxyPass http://localhost:4747
    ProxyPassReverse http://localhost:4747/gonic
    ProxyPassReverseCookiePath "/" "/gonic"
</Location>

traefik

coming soon

caddy

	redir /gonic /gonic/

	handle_path /gonic* {
		reverse_proxy http://localhost:4747
	}

Clone this wiki locally