GoWilkes

Well-Known Member
Sep 26, 2006
488
12
168
cPanel Access Level
Root Administrator
I have 104 domains parked on top of a main domain, and I'm wanting the same subdomains to work for all of them.

Meaning, beta.parked.com should show the same thing as beta.example.com.

I thought that this was working before, but it's not working now. I haven't changed anything in my configuration in months, so I don't know if I'm wrong that it was ever working, or if something changed in cPanel/WHM.

Other than setting up 104 subdomains manually, is there a way for me to make all of the parked domains recognize the subdomains (the same way that "Domain Forwarder" does for emails)?

TIA!
 

GoWilkes

Well-Known Member
Sep 26, 2006
488
12
168
cPanel Access Level
Root Administrator
Update:

From what I can tell, this should be done by editing httpd.conf; find the VirtualHost for the subdomain that's been created, then add a ServerAlias:

Code:
<VirtualHost 123.45.67.89:80>
  ServerName beta.example.com
  ServerAlias www.beta.example.com

  # add this
  ServerAlias beta.parked.com www.beta.parked.com

  # leave everything else in this section alone
</VirtualHost>
Then, update /etc/userdomains, adding one line for each new subdomain to the next-to-last line:

Code:
beta.parked.com: example     # where "example" is the main account name
beta.parked2.com: example
beta.parked3.com: example
*: nobody                          # this is the default last line
Is there anything else that needs to be done?

FWIW, I'm using Redhat Enterprise 5.10 x86_64 standard, WHM 11.40.0 (build 19).