sneader

Well-Known Member
Aug 21, 2003
1,195
65
178
La Crosse, WI
cPanel Access Level
Root Administrator
I must be a real moron, but I can't figure this out.

Main account is xyz.com

www.xyz.com works fine, points to home/xyz/public_html

I also want testing.xyz.com to point to the same directory, home/xyz/public_html. In other words:

www.xyz.com = testing.xyz.com

Everything I can see about creating subdomains, or add-on domains, takes the new domain/subdomain and points it to a subdirectory. I tried using Add-On Domains, but it won't let me add on "testing.xyz.com".

I could probably get this going by firing up a shell session (I'm the root owner of the box), but I would like to figure this out via cPanel.

Thanks, in advance, for helping a newbie.

- Scott
 

sneader

Well-Known Member
Aug 21, 2003
1,195
65
178
La Crosse, WI
cPanel Access Level
Root Administrator
I would still like to know how to use cPanel to make a subdomain point to the main public_html directory, so that testing.xyz.com = www.xyz.com

However, I figured out how to do it via SSH... I just edited the httpd.conf and restarted Apache. The setting that needed to be edited is the ServerAlias.

It used to say:

ServerAlias www.xyz.com xyz.com

I changed it to read:

ServerAlias www.xyz.com testing.xyz.com xyz.com

That was pretty easy. Any way to do this within cPanel or WHM?

- Scott
 

casey

Well-Known Member
Jan 17, 2003
2,288
0
191
Could you create the subdomain as usual and then park it on top of the main domain? I don't know I'm just trying to help brainstorm.