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.

Subdomain access with prefix www

Discussion in 'General Discussion' started by dxer, May 2, 2003.

  1. dxer

    dxer Well-Known Member

    Joined:
    Sep 9, 2002
    Messages:
    295
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Europe
    hi!

    Is it possible and how that subdomain can be accesible with prefix "www" ?
    For example: I have subdomain "cat" on domain "mouse.com".
    Is it possible and how that this is accesible by typing" www.cat.mouse.com"

    Thanks
     
  2. TheVoice

    TheVoice Well-Known Member

    Joined:
    Feb 7, 2002
    Messages:
    105
    Likes Received:
    0
    Trophy Points:
    16
    yes its very possible. just type in www.cat for the subdomain.
     
  3. dxer

    dxer Well-Known Member

    Joined:
    Sep 9, 2002
    Messages:
    295
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Europe
    I tried this but it did not worked. I did go to subdomain control in Cpanel and typed "www.cat" but Cpanel made subdomain "cat".

    Anyway, I tried typing in browser "www.cat.mouse.com" but dns error appeard. Is there something I need to do more ?
     
  4. Hoster2k

    Hoster2k Well-Known Member

    Joined:
    Jun 17, 2002
    Messages:
    131
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    UK
    Add the relevant dns record after you have created subdomain "cat" for the "www.cat" and then add an alias in httpd.conf
     
  5. dxer

    dxer Well-Known Member

    Joined:
    Sep 9, 2002
    Messages:
    295
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Europe
    Can You please send me some more details. I'am not familiar with this so please step by step.

    Thank you very much
     
  6. Hoster2k

    Hoster2k Well-Known Member

    Joined:
    Jun 17, 2002
    Messages:
    131
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    UK
    In the vhost, add the following:

    ServerAlias www.sub.domain.com sub.domain.com

    Restart apache

    For the dns, add an entry www.sub and A to the ip that sub has been put on.
     
  7. dxer

    dxer Well-Known Member

    Joined:
    Sep 9, 2002
    Messages:
    295
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Europe
    vhost is ??

    So I must add this for every subdomain or is there a way to set it up for every subdomain in future.

    Subdomain is on domain which IP is shared with rest of domains on server . So what about that now ?
     
  8. Hoster2k

    Hoster2k Well-Known Member

    Joined:
    Jun 17, 2002
    Messages:
    131
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    UK
    In the vhost tag on httpd.conf on the server.

    Yes you must add it as it us not added by default.

    If the domain is on the shared server ip, then put that.
     
  9. dxer

    dxer Well-Known Member

    Joined:
    Sep 9, 2002
    Messages:
    295
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Europe
    Ok I get it but is there a way to set this up so I don't need to do this for every subdomain in future ?

    If I must how this will look in httpd.conf ?

    It was long time I was changing something in there . How to find httpd.conf in shell and hot to open it . Is it PICO or what ?

    Thanks so much!
     
  10. Markwaugh

    Markwaugh Well-Known Member

    Joined:
    Aug 12, 2003
    Messages:
    151
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Sydney, Australia
    Hello Hoster,

    Thank you for your info :

    ServerAlias www.sub.domain.com sub.domain.com

    Restart apache

    For the dns, add an entry www.sub and A to the ip that sub has been put on.

    I tried this but i still get the main index page and NOT the subdomain index page.15

    any ideas how to fix it

    cPanel.net Support Ticket Number:
     
Loading...

Share This Page