I am having trouble with new users on subdomains. I have setup a DNS entry:
*.mydomain.com. 14400 IN A 12.34.56.78
I also edited my httpd.conf with the folowing:
<VirtualHost 12.34.56.78>
ServerAlias *.mydomain.com
ServerAdmin webmaster@mydomain.com.com
DocumentRoot /home/username/public_html
BytesLog domlogs/mydomain.com-bytes_log
ServerName http://www.mydomain.com
User username
Group username
CustomLog /usr/local/apache/domlogs/mydomain.com combined
Options -ExecCGI -Includes
<Directory "/home/username/public_html">
Options Indexes FollowSymLinks MultiViews
AllowOverride FileInfo Options
Order allow,deny
allow from all
</Directory>
</VirtualHost>
I am not sure if this is correct or not. BTW, I did restart BIND & APACHE. My problem seems to be that when I use a ServerAlias of *.mydomain.com only the subdomain will work but not the main site URL. If I use a ServerAlias of mydomain.com the subdomains do not work. I also tried adding:
RedirectMatch 301 (.*) http://mydomain.com$1
I got a neverending redirect because of this. Any help would be greatly appreciated.
Thank You,
Jeremy