On 06/12/11 11:01, Bambero wrote:
> Hello
> 
> I have many IP and IP based virtualhost configured.
> 
> My hostname.em0 looks like this:
> inet 123.456.789.66 255.255.255.224
> inet alias 123.456.789.67 255.255.255.224
> inet alias 123.456.789.68 255.255.255.224
> inet alias 123.456.789.70 255.255.255.224
> inet alias 123.456.789.71 255.255.255.224
> ...
> 
> My virtualhost part in httpd.conf:
> <VirtualHost 123.456.789.70:80>
>     ...
> </VirtualHost>
> 
> <VirtualHost 123.456.789.71:80>
>     ...
> </VirtualHost>
> ...
> 
> Everything works fine. But when making request (for ex. fsockopen)
> with php the outgoing IP is 123.456.789.66.
> Does anybody know how to tell php to bind to virualhost IP when making 
> request ?

I doubt there is a magic function to do that.

I'd suggest looking at the environment variables and the first example
of the following page:

http://se2.php.net/manual/en/function.socket-bind.php

> 
> Regards
> Bambero

Reply via email to