I am trying to configure a new vhost in apache under Amazon Linux. The new site should respond to newsite.mydomain.com, while the existing site should respond to all other requests to mydomain.com. This is what my vhosts.conf looks like:
NameVirtualHost *:80
<VirtualHost *:80>
ServerAdmin support@mydomain.com
DocumentRoot /var/www/public/newsite.mydomain.com/html
ServerName newsite.mydomain.com
ErrorLog /var/www/public/newsite.mydomain.com/logs/error.log
CustomLog /var/www/public/newsite.mydomain.com/logs/access.log common
</VirtualHost>
<VirtualHost *:80>
ServerAdmin support@mydomain.com
DocumentRoot /var/www/html
ServerName *.mydomain.com
ServerAlias *.myotherdomain.com
ErrorLog logs/error_log
</VirtualHost>
With this config, I can get to the new site just fine, but the existing site using the wildcards breaks, it brings up the default apache page.
What am I doing wrong?
Thanks for any help,
Warren