Adding More IPs

Discussion in 'Site & Server Administration' started by cancer10, Aug 2, 2009.

  1. #1
    Hi

    We all know that our localhost can be accessed at 127.0.0.1 or your the IP assigned by your NIC which starts from 192.168.1.2 (or 192.168.0.2 in some cases depending on the router you use).

    My question is that, how do I map the other IPs 192.168.1.3, 192.168.1.4, 192.168.1.5 etc. etc. and have them point to my localhost?

    Please help

    Thanks
     
    cancer10, Aug 2, 2009 IP
  2. arunn

    arunn Active Member

    Messages:
    347
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    60
    #2
    there are two perspectives in this..

    you want these IP's point to localhost on a single pc regardless of what your router says

    [or]
    you want your apache server listen to those IP address as well, provided the router will route traffic to your pc.

    Let me know and i will guide you from there..
     
    arunn, Aug 2, 2009 IP
  3. National

    National Peon

    Messages:
    42
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    i think the ip provider maps the ips
     
    National, Aug 2, 2009 IP
  4. cancer10

    cancer10 Guest

    Messages:
    364
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Hi

    I want the IPs to point to different folders on my PC. I am using apache 2.2.4

    So for example:

    192.168.1.3 will point to C:\songs

    192.168.1.4 will point to C:\website\images

    192.168.1.5 will point to D:\videos


    pls help :)


    Many thanks
     
    cancer10, Aug 2, 2009 IP
  5. National

    National Peon

    Messages:
    42
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Add the records in ur apache config virtual host
     
    National, Aug 2, 2009 IP
  6. eric_basher

    eric_basher Peon

    Messages:
    185
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #6
    dont forget to add the ip's to host in windows/system32
     
    eric_basher, Aug 5, 2009 IP
  7. Rudolf Bodocsi

    Rudolf Bodocsi Peon

    Messages:
    69
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Hi,

    You need add virtualhost's to your httpd.conf file.

    Virtualhost example:

        
    
    Port 80
        DocumentRoot /www/domain
        ServerName www.domain.tld
    
        <VirtualHost 111.22.33.55>
        DocumentRoot /www/otherdomain
        ServerName www.otherdomain.tld
        </VirtualHost>
    
        <VirtualHost 111.22.33.100>
        DocumentRoot /www/otherdomain2
        ServerName www.otherdomain2.tld
        </VirtualHost>
    
    
    
    Code (markup):
    Rudolf
     
    Rudolf Bodocsi, Aug 5, 2009 IP