Find the answer to your Linux question:
Results 1 to 2 of 2
I have Apache webserver in front end acting as reverse proxy for application servers. Now the Problem is. I have 4 network cards and 5 IPs on the apache httpd ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Aug 2011
    Posts
    1

    Apache IP Address and NIC Messup


    I have Apache webserver in front end acting as reverse proxy for application servers. Now the Problem is. I have 4 network cards and 5 IPs on the apache httpd webserver machine. I have configured apache to listen on first IP address 10.10.1.1 port 80 via Virtual host.

    Now when a client hits my apache webserver it goes to the application server to fetch data the problem is.. apache is using 4th IP address that is 192.168.100.5. I dont want apache to use 192.168.100.5 IP Address to connect to the application server. I want apache to use 2nd IP Address 10.10.2.1 to connect to Applicaton server at the backend.. is it possible? How can i accomplish this ?

    Details:
    Webserver IPs
    NIC1 - 10.10.1.1
    NIC1 - 10.10.2.1 - (additional IP)
    NIC2 - 172.16.0.1
    NIC3 - 202.156.34.34
    NIC4 - 192.168.100.5

    App server IP
    10.10.2.12

    please let me know if there is a solution to change the IP Addresses of outgoing apache connection

  2. #2
    Super Moderator Roxoff's Avatar
    Join Date
    Aug 2005
    Location
    Nottingham, England
    Posts
    3,885
    This could be a network routing issue on the web server - when your Apache session tries to connect to the remote machine it follows the normal routing table. I'm assuming you have a subnet for each of the NICs, so you want to do a 'route add' for the subnet (probably 10.10.2.*) that goes off to through the right device (eth1 or whatever it's called). Something like this:

    route add -net 10.10.2.0 netmask 255.255.255.0 dev eth1
    Linux user #126863 - see http://linuxcounter.net/

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •