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.

main virtualhost for my domain overrides a subdomain i setup in cpanel

Discussion in 'General Discussion' started by nsanden, May 11, 2010.

  1. nsanden

    nsanden Member

    Joined:
    May 11, 2010
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    I have an account I setup as domain.com. I then later added a subdomain in cpanel of * for that domain and added the appropriate wildcard dns.

    Looking in httpd.conf I now see this:

    <VirtualHost IP>
    ServerName domain.com
    ServerAlias *.domain.com www.domain.com
    DocumentRoot /home/domain/public_html
    </VirtualHost>

    ...

    <VirtualHost IP>
    ServerName *.domain.com
    ServerAlias *.domain.com
    DocumentRoot /home/domain/public_html/somewhere
    </VirtualHost>

    Obviously in order for the 2nd virtual host to work correctly I need the first one to not use a wildcard serveralias. Is this possible without easyapache reverting it back every time or is there a better way to achieve what i'm trying to do?

    Thanks for any help!
     
  2. nsanden

    nsanden Member

    Joined:
    May 11, 2010
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    Figured it out!

    In case someone else has this problem.
    Simply needed to edit: /var/cpanel/userdata/{user}/main

    and remove the *domain.com parked domain.

    then rebuild httpd.conf:

    /usr/local/cpanel/bin/apache_conf_distiller --update
    /scripts/rebuildhttpdconf
     
Loading...

Share This Page