Re: alias address in REMOTE_ADDR
| From: | Jim Lucas | Date: | Sat, 12 May 2012 06:54:56 +0000 |
| Subject: | Re: alias address in REMOTE_ADDR | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-317856@lists.php.net to get a copy of this message | ||
On 5/11/2012 10:57 PM, Tóth Csaba wrote:
Hi Everyone, I've run into a curious problem, not even really sure it's PHP, but that's where I caught it, so here it is: I have two servers hanging on the net, without proxies. Let's call them Server1 and Server2. Server1 has multiple IP addresses, configured as aliases. My problem: When I do a wget --spider from 1 to 2, I get the eth0 (not alias) address in Apache's accesslog on Server2. But when I do a file_get_contents(http://server2.tld), and observe the $_SERVER['REMOTE_ADDR'] on Server2, I get one of the alias IP addresses back. What can cause this? I really need the eth0 IP address back in REMOTE_ADDR. Regards, CsabaWhat IP address is your Apache bound to? You eth0 or one of the alias IPs? Jim