Sorry for disagreeing, but of course it is a proxy specific issue; As
far as I know, no other module connects to another server (ignoring
mod_rewrite which uses mod_proxy for this purpose).

And as the original sender hinted by the "Subject" header, it is easy
to implement: just "bind()" the required IP into the socket before
calling "apr_connect()" (it may require a minor fix in APR, I'm not
sure).

Port number should be left 0, to let the kernel choose its own
ephemeral port.

I believe that we should give more attention to this question. In my
first look, it is easy to add directives ("ProxyIP"/"ProxyHost"?) and
code to implement it ("bind()"), and it looks useful for some needs.

Even without the additional directive, when the original request
reached to a specific vhost, it would make sense to bind the outgoing
socket to the IP of that vhost (as the original sender wished).

Graham Leggett wrote:
> 
> 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.

-- 
Eli Marmor
[EMAIL PROTECTED]
CTO, Founder
Netmask (El-Mar) Internet Technologies Ltd.
__________________________________________________________
Tel.:   +972-9-766-1020          8 Yad-Harutzim St.
Fax.:   +972-9-766-1314          P.O.B. 7004
Mobile: +972-50-23-7338          Kfar-Saba 44641, Israel

Reply via email to