wildcard subdomains and normal subdomains at the same time

mojoinst

Registered
Feb 15, 2007
1
0
151
Hi All,

I am running a domain on cPanel that is using wildcard subdomains, which is all functioning fine :)

I now have the need to add an addtional subdomain that has a different web root directory (basicall outside of public_html directory).

At present I have tried to add the subdomain in cPanel, but when i browse to http://sub.domain.com.au, it renders the contents of the public_html directory (IE: the wildcard subdomain is taking precedence).

Any help on this would be very much appreciated,

Kind regards,

Mojoinst
 

cPanelDavidG

Technical Product Specialist
Nov 29, 2006
11,216
12
313
Houston, TX
cPanel Access Level
Root Administrator
Hi All,

I am running a domain on cPanel that is using wildcard subdomains, which is all functioning fine :)

I now have the need to add an addtional subdomain that has a different web root directory (basicall outside of public_html directory).

At present I have tried to add the subdomain in cPanel, but when i browse to http://sub.domain.com.au, it renders the contents of the public_html directory (IE: the wildcard subdomain is taking precedence).

Any help on this would be very much appreciated,

Kind regards,

Mojoinst
In a cPanel/WHM environment, the wildcard domain will always take higher precedence.
 

sirdopes

Well-Known Member
PartnerNOC
Sep 25, 2007
141
0
66
You can manually add the vhost entries to an include file but it needs to be included before the wildcard one. Also, cpanel rebuilds the httpd.conf sometimes and changes can be reverted back.