The scenario:
I have one physical server with multiple ip addresses.
Lets say:
- 1.1.1.1
- 1.1.1.2
- 1.1.1.3
It runs apache2 and is configured as forward proxy.
Now if I a client makes a request to example.com using the ip address 1.1.1.1 as proxy, the server should fetch the data from example.com exposing this ip.
However if a client has configured 1.1.1.2 as IP address, this ip should be used to make the request.
I currently have set up proxmox ve and run several virtual instances on that box with one IP and one apache2 instance each. I want to get rid of that overhead.
I know that I can put a <Proxy> statement into a <VirtualHost> container.
Currently my my test environment ist listening on all IP adresses, and proxy requests work on every address. However the origin fetch is always done using the first address.
I tried something similar to this:
<VirtualHost 1.1.1.1:80>
ProxyRequests On
<Proxy *>
Order deny,allow
Deny from all
Allow from ...
</Proxy>
</VirtualHost>
<VirtualHost 1.1.1.2:80>
ProxyRequests On
<Proxy *>
Order deny,allow
Deny from all
Allow from ...
</Proxy>
</VirtualHost>
But something seems not to be working.. Can somebody point me in the right direction?