What am I trying to achieve -> I'd like to use my locally run application through docker container.
I created an apache proxy running in docker container. proxy (docker container) -> localhost application (on physical host)
When I direct my browser to docker_ip:8001, the apache instance is running, but it can't proxy the host localhost.
Configuration is as follows:
<Location /test/auth>
SSLRequireSSL
SSLVerifyClient optional
SSLVerifyDepth 3
SSLOptions +ExportCertData +StdEnvVars
RewriteEngine on
RewriteCond %{SSL:SSL_CLIENT_VERIFY} !^SUCCESS$
RewriteRule .* /test/fail [L]
</Location>
RequestHeader set HTTPS "%{HTTPS}s" env=HTTPS
...
ProxyPass /test http://host:8080/test retry=0
ProxyPassReverse /test http://host:8080/test
I have an application running on wildfly @ http://localhost:8080/test (host machine)
The expected behaviour is that I go to docker_ip:8001/test and I can use the application running at http://localhost:8080/test.
This does not work for me and nor the other similar questions. eth0 ip is pingable, but when I do wget I get connection refused.
So I tried running
docker run --add-host=host:192.168.xxx.xxx -p 8001:443 -it docker-test bash
now pinging and wget against host worked well and it received a response from an apache I'm running on host. How can I replace 192.168.xxx.xxx with localhost?
*Note: using win7, but this should not really matter?