Just tested myself also.
You need to modify tomcat server.xml as in mentioned in here
https://guacamole.apache.org/doc/gug/reverse-proxy.html#setting-up-the-remote-ip-valve
I am running guacamole on rootless podman so I have copied
/usr/local/tomcat/conf/server.xml file from container image and added following
lines jus before where Host section ends. You need to of course set your own
internalProxies value, this ip (10.0.2.100) is for rootless podman yours maybe
127.0.0.1 (if in same host).
<Valve className="org.apache.catalina.valves.RemoteIpValve"
internalProxies="10.0.2.100"
remoteIpHeader="x-forwarded-for"
remoteIpProxiesHeader="x-forwarded-by"
protocolHeader="x-forwarded-proto" />
I create guacamole with following command
podman run -dt --pod guac --name guacamole -v
${PWD}/guac/server.xml:/usr/local/tomcat/conf/server.xml
--env-file=${PWD}/.env-guac docker.io/guacamole/guacamole:1.4.0
-Timo
From: Luciano Oliveira <[email protected]>
Sent: torstai 6. tammikuuta 2022 13.39
To: [email protected]
Subject: RE: Proxy reverse Caddy
🙂
It really works great, but I'm still trying to display the remote host on
Remote Host in settings, history
my /etc/caddy/Caddyfile
guacamole.domain.local:80 {
rewrite / /guacamole
uri strip_prefix /guacamole/*
reverse_proxy guacamole.domain.local:8080
}
Accessing via tomcat, I have the remote host information,
http://guacamole.domain.local:8080/guacamole/
-Luciano
________________________________
De: Timo Nisula
<[email protected]<mailto:[email protected]>>
Enviado: quarta-feira, 5 de janeiro de 2022 13:54
Para: [email protected]<mailto:[email protected]>
<[email protected]<mailto:[email protected]>>
Assunto: RE: Proxy reverse Caddy
I’m also interested using caddy v2. Yesterday I googled little bit and it
should be really simple, not enough time test…
Doc https://caddyserver.com/docs/v2-upgrade#proxy
Reverse_proxy enables Host headers, X-Forwarded-For and websocket. So
basically, following should be enough
guacamole.domaain.com {
rewrite / /guacamole
reverse_proxy /guacamole guacamole:8080
}
I will test this when I have little more time, perhaps on weekends.
-Timo
From: Luciano Oliveira <[email protected]<mailto:[email protected]>>
Sent: keskiviikko 5. tammikuuta 2022 18.42
To: [email protected]<mailto:[email protected]>
Subject: Proxy reverse Caddy
Anyone using Caddy as reverse proxy!?
thks