I have 3 IPs in my server, I want use them to increase twitter API limits.
How to set a different ip for a directory in centos 6.1 httpd.conf (Apache 2.3.1)
I added these line in the bottom of httpd.conf
<VirtualHost NEW IP:80> ServerName mydomain.com/subdir ServerAlias www.mydomain.com/subdir DocumentRoot /var/www/html/subdir <directory "/var/www/html/subdir"> Options Indexes FollowSymLinks AllowOverride all Order Deny,Allow Allow from all </directory> </VirtualHost> But when I test /var/www/html/subdir/index.php with code
<?php function get_server_ip() { if (isset($_SERVER)) { if($_SERVER['SERVER_ADDR']) { $server_ip = $_SERVER['SERVER_ADDR']; }else{ $server_ip = $_SERVER['LOCAL_ADDR']; } }else { $server_ip = getenv('SERVER_ADDR'); } return $server_ip; } echo get_server_ip(); ?> it still return OLD IP (default ip for my server). So is it possible and how? If it couldn't, how to use 3 IPs to increase twitter API limits.