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.

Setting up wildcard subdomains (WPMU Specific)

Discussion in 'General Discussion' started by HH-Steven, Jan 19, 2009.

  1. HH-Steven

    HH-Steven Well-Known Member

    Joined:
    Aug 29, 2004
    Messages:
    284
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    Root Administrator
    Hi,

    Im attempting to install WPMU and running into a dead end, ive had it working before but this time its just not having it.

    The parts im having trouble with are the http.conf edits and wildcards.

    Firstly i need to add *.domain.tld as a serveralias which im doing via:

    /var/cpanel/userdata/username/domain.tld

    Ive also tried adding RedirectMatch 301 (.*) http://domain.tld$1

    Once this is saved and http restarted any changes are lost.

    Secondly, i need to add *.domain.tld to the dns which i have as below:

    /var/named/domain.tld.db (edited via WHM > Edit DNS Zone)

    * 14400 IN CNAME 111.22.333.444.domain.tld.
    *.domain.tld 14400 IN A 111.22.333.444

    (on the cname one, i am saving it with just the ip address, its adding the domain name after)

    No matter what i do wilcards just arn't working for me.

    Additionally:

    root@server[~]# /usr/local/cpanel/bin/apache_conf_distiller --update
    Distilled successfully
    root@server [~]# /usr/local/cpanel/bin/build_apache_conf
    Built /usr/local/apache/conf/httpd.conf OK
    root@server [~]# service httpd restart
    root@server [~]#

    This results in a blank httpd.conf (specifically after rebuilding httpd.conf) which i then have to restore from the backup.

    Any help or advice is greatly appreciated here.

    Cheers.
     
  2. 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 know many WPMU users nowadays will just create a wildcard subdomain right in the cPanel interface. You can create a wildcard subdomain just like creating any other subdomain, just use * as the subdomain (creating *.example.com where example.com is your domain).
     
Loading...

Share This Page