I'm sorry. That was my mistake.
Now it's working. Thank you :-)
My nginx proxy:
--------------------------------------
location / {
proxy_pass http://127.0.0.1:8090/guacamole/;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forward-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forward-Proto http;
proxy_set_header X-Nginx-Proxy true;
proxy_buffering off;
}
--------------------------------------
and part of my docker-compose.yml:
--------------------------------------
image: guacamole/guacamole:1.5.3
ports:
- "127.0.0.1:8090:8080"
environment:
...
REMOTE_IP_VALVE_ENABLED: 'true'
PROXY_IP_HEADER: "X-Real-IP"
PROXY_PROTOCOL_HEADER: "X-Forward-Proto"
...
--------------------------------------
And RemoteIpValve in now ok:
--------------------------------------
# docker exec -ti guacamole_guac_1 sh -c "cat
/home/guacamole/tomcat/conf/server.xml | grep RemoteIpValve"
<Valve className="org.apache.catalina.valves.RemoteIpValve"
remoteIpHeader="X-Real-IP" protocolHeader="X-Forward-Proto"/>
--------------------------------------
po 14. 8. 2023 v 13:51 odesílatel Nick Couchman <[email protected]> napsal:
> On Mon, Aug 14, 2023 at 3:18 AM Martin Vancl <[email protected]> wrote:
> >
> > Ok. I'm sorry, my mistake.
> > There is real config: https://pastebin.com/FPhetEie
> > and there is this "empty" line:
> >
> > <Valve className="org.apache.catalina.valves.RemoteIpValve"/>
> >
>
> Yes, the "empty" line enables the RemoteIPValve with its default
> values. If you need to adjust values, for example, internalProxies,
> you can use the other Docker variables that I mentioned previously,
> which will have the effect of writing additional values into the line
> in the server.xml file.
>
> In my non-Docker install, where Nginx is running on the same system as
> Tomcat, adding the line above is all that is needed for the correct
> IPs to be passed from Nginx to Tomcat and logged in Guacamole.
>
> -Nick
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>
--
S pozdravem
Ing. Martin Vancl
e-mail: [email protected]
web: www.vancl-it.cz