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.

addon/subdomain wierdness

Discussion in 'General Discussion' started by cosmicdynamo, Jun 6, 2003.

  1. cosmicdynamo

    cosmicdynamo Registered

    Joined:
    Jan 16, 2003
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Hello all, newbie here...:)


    Ok, all of my addon domains have this same "problem"...

    Whenever I go to [addon domain] mydomain.com/directory it resolves to mydomain.masterdomain.com/directory...how can I have it so that it stays at mydomain.com/directory?


    thanks
    Pierre

    cPanel.net Support Ticket Number:
     
  2. cosmicdynamo

    cosmicdynamo Registered

    Joined:
    Jan 16, 2003
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    ^ anybody? :D Old thread, I didn't want to start a new one. I just can't figure it out.

    cPanel.net Support Ticket Number:
     
  3. MscLimp

    MscLimp Active Member

    Joined:
    Mar 3, 2003
    Messages:
    35
    Likes Received:
    0
    Trophy Points:
    6
    Hey... yeah same problem here!
    A client finds that really annoying.
    Is there a solution to this?
    Thanks,
    Greg

    cPanel.net Support Ticket Number:
     
  4. keyDet79

    keyDet79 Well-Known Member

    Joined:
    May 11, 2003
    Messages:
    54
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Netherlands
    'addon-domain.com/dir' will always flip to 'addon-subdomain.maindomain.com/dir' unless you do 'addon-domain.com/dir/' with a '/' at the end. Very weird and it annoys some of our customers. Just wanted to post it and noticed it was already there.

    cPanel.net Support Ticket Number:
     
  5. Stefaans

    Stefaans Well-Known Member

    Joined:
    Mar 5, 2002
    Messages:
    451
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    Vancouver, Canada
    The problem lies with the servername setting in you httpd.conf. Presumably because cPanel parks an addon domain on top of a subdomain, the subdomain is used for the servername. And when you do not use the trailing / as keyDet79 suggests, Apache serves the servername.

    To fix, check your httpd.conf. You will find something like this for your addon domain:

    <VirtualHost 11.22.33.44>
    BytesLog domlogs/mydomain.masterdomain.com-bytes_log
    .
    .
    ServerName mydomain.masterdomain
    ServerAlias mydomain.com *.mydomain.com
    .
    .
    </VirtualHost>


    Change the servername setting to your domain with or without the www. as you prefer:

    <VirtualHost 11.22.33.44>
    BytesLog domlogs/mydomain.masterdomain.com-bytes_log
    .
    .
    ServerName www.mydomain.com
    ServerAlias mydomain.com *.mydomain.com mydomain.masterdomain

    .
    .
    </VirtualHost>


    In the above example, www.mydomain.com will now appear whenever I do not use the trailing /. I have also moved the subdomain to the serveralias line to ensure i can access it that way as well (with a trailing /).

    I hope this makes sense ;)

    cPanel.net Support Ticket Number:
     
  6. kris1351

    kris1351 Well-Known Member

    Joined:
    Apr 18, 2003
    Messages:
    963
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Lewisville, Tx
    That fixed the problem we were having with a couple of clients. Wierd how it adds the wrong info from Cpanel.

    cPanel.net Support Ticket Number:
     
  7. Curious Too

    Curious Too Well-Known Member

    Joined:
    Aug 31, 2001
    Messages:
    427
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    Root Administrator
    Add the following directive to the Virtual Host entry for your addon domain:

    UseCanonicalName Off

    cPanel.net Support Ticket Number:
     
  8. graham_w

    graham_w Well-Known Member

    Joined:
    May 25, 2004
    Messages:
    50
    Likes Received:
    0
    Trophy Points:
    6
    Sorry for bumping an old thread but ive made those changes to httpd.conf and it isnt working. Does it take any length of time for it to kick in or should I notice it working straight away ?
     
Loading...

Share This Page