setting up subdomain wildcard: configured A record, VirtualHost... still does not work
- by user80314
Running Apache on CentOS, trying to setup wildcard subdomains,
basically I want .mydomain.com to point to mydomain.com
With cPanel I added *.mydomain.com
With WHM I made sure that A record is pointing to the right IP.
I set my A record:
* 14400 IN X.x.x.x
My httpd.conf:
ServerName _wildcard_.mydomain.com
ServerAlias *.mydomain.com
DocumentRoot /home/mydomain/public_html
ServerAdmin [email protected]
UseCanonicalName Off
## User userdomain# Needed for Cpanel::ApacheConf
UserDir enabled userdomain
<IfModule mod_suphp.c>
suPHP_UserGroup userdomain userdomain
</IfModule>
<IfModule !mod_disable_suexec.c>
<IfModule !mod_ruid2.c>
SuexecUserGroup usergrdomain userdomain
</IfModule>
</IfModule>
<IfModule mod_ruid2.c>
RUidGid userdomain userdomain
</IfModule>
ScriptAlias /cgi-bin/ /home/mydomain/public_html/cgi-bin/
# To customize this VirtualHost use an include file at the following location
# Include "/usr/local/apache/conf/userdata/std/2/mydomain/wildcard_safe.mydomain.com/*.conf"
I have my VirtualHost in httpd.conf set to point to domain root. Restarted Apache, server, dns, still nothing.
I have spent hours researching this, followed instructions, set everything correctly.
What am I missing?