Cahya Wirawan wrote:
following is my virtualhost configuration:
Listen 192.168.0.2:80 NameVirtualHost 192.168.0.2:80 <VirtualHost 192.168.0.2> ServerName abc.mydomain.org ProxyPass / http://def.mydomain.org/ ProxyPassReverse / http://def.mydomain.org/ </VirtualHost>
and the main ip address of my interface is 192.168.0.1 (eth0), and
192.168.0.2 is only an alias to the same interface (eth0:0), .
everything is fine, 192.168.0.2 listen to port 80, and the request to this ip address with host header abc.mydomain.org will be proxied to def.mydomain.org. The only problem is that def.mydomain.org get http request from ip address 192.168.0.1 , and not from 192.168.0.2.
So, how can I tell apache to use 192.168.0.2 instead of 192.168.0.1
if it makes http request to def.mydomain.org ?
This isn't a proxy specific issue, as a result you'll probably get a better response if you ask this question on the dev@httpd.apache.org mailing list.
I am not aware that this is possible - you would need a mechanism to specify the source address, and this is an OS specific thing to my knowledge. If you ask on the dev list, you'll probably get a better explanation.
Regards, Graham --