I'm running a httpd apache2
proxy in docker swarm
mode with docker stack deploy
.
Problem: when I access mymachine:80
, the access.log
only shows the remote ip of the docker ingress
swarm network, like 10.0.0.2
. And not the real clients' ip.
Question: how can I tell swarm to retain the original IP address (maybe write it into another IP header?), without having to force my container or ports into mode: host
?
Because I don't want to use zero-downtime deployment, which is what I have in docker-swarm mode without containers in host-mode.