The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Making a site appear on an IP

Discussion in 'General Discussion' started by thealee, Jun 18, 2007.

  1. thealee

    thealee Member

    Joined:
    Oct 5, 2006
    Messages:
    16
    Likes Received:
    0
    Trophy Points:
    1
    Hi there,

    I've done this before, just wanted to check how its properly done.

    Basically, a reseller has their own IP that he uses for his websites, he wants his website to appear when you goto to the IP as well.

    So 1.1.1.1 goes to resellersite.com, and clientsite.com is on 1.1.1.1

    I hope I was clear. If I'm correct I believe this is something to do with the virtual hosts section of httpd.conf.

    Thanks for reading.
    -Alex
     
  2. sparek-3

    sparek-3 Well-Known Member

    Joined:
    Aug 10, 2002
    Messages:
    1,384
    Likes Received:
    23
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    In the httpd.conf file you will see a lot of VirtualHost containers. Find the one that refers to the reseller account, it will begin with:

    <VirtualHost 1.1.1.1>

    Now cut and paste this entire VirtualHost container so that it is the first VirtualHost listed that uses the 1.1.1.1 IP. Remove the duplicate VirtualHost container for the reseller account if necessary.

    Whatever VirtualHost container is listed first in the httpd.conf file for a given IP, that is the website that will be displayed when going directly to the IP.

    Be sure you make a backup copy of your httpd.conf file prior to making changes:

    cp /etc/httpd/conf/httpd.conf /etc/httpd/conf/httpd.conf.thisoldone
     
Loading...

Share This Page