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.

Specifying the default domain when accessing via shared IP

Discussion in 'General Discussion' started by airbeck, Jun 25, 2008.

  1. airbeck

    airbeck Registered

    Joined:
    Sep 12, 2006
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    Hey,

    I don't know if this topic has come up here before, but I have a reseller customer that has all his domains on a single shared IP. He wanted to know if there was a way to set which domain on that IP will come up when accessing it by putting the IP into a browser, like http://xxx.xxx.xxx.xxx

    I understand this is determined by which domain on that IP comes first in the httpd.conf file.

    What I don't know is how to change which domain comes first in that file. Just editing it won't work because it will just be overwritten the next time the file is generated. So the question is whether there is a way to make cPanel generate that file in any particular order.

    So has anyone come across this issue before, or have any ideas?

    Thanks,

    Aaron
     
  2. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    I'm not aware of a way to do that for it to survive the cPanel configuration scripts. It would be a handy feature if this could be done easily (perhaps in the IP Functions section of WHM). I'd suggest you log an enhancement request in http://bugzilla.cpanel.net if there isn't one already and then post the link to it back here so others can vote for it.
     
  3. jeroman8

    jeroman8 Well-Known Member

    Joined:
    Mar 14, 2003
    Messages:
    410
    Likes Received:
    0
    Trophy Points:
    16
    been looking in the templates files but can't find any vhost records there where you can change the order. Tested to change the order directly in httpd and the run destiller but it did not save it.

    So anyone know how to change the order domains is listed in httpd.conf please let us know.
     
  4. electric

    electric Well-Known Member

    Joined:
    Nov 5, 2001
    Messages:
    697
    Likes Received:
    1
    Trophy Points:
    18
    I agree that this would be a nice feature to have available in the WHM, so we (and resellers) can easily set the "default" website for a shared IP.

    I looked in the bugzilla system, but did not see this anywhere.. does a request already exist for it? Seems like a pretty common "problem", so I figured there would already be a feature request for it I can add my vote to...

    ??
     
  5. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    I am unable to locate such an entry in bugzilla at this time.
     
  6. electric

    electric Well-Known Member

    Joined:
    Nov 5, 2001
    Messages:
    697
    Likes Received:
    1
    Trophy Points:
    18
  7. FreedomBI

    FreedomBI Well-Known Member

    Joined:
    Jul 7, 2008
    Messages:
    65
    Likes Received:
    0
    Trophy Points:
    6
    I accomplished this by copying entries to pre_virtualhost_global.conf. If you want a different default domain for the entire box (ie, for unallocated IP's), you need to edit the templates in /var/cpanel/templates/apache2. Make sure to read all of the comments at the top of main.default.
     
Loading...

Share This Page