I want one subdomain to point to another on the same domain.DNS RecordsType          Name            Value-----------------------------------------A        s1.example.com    10.20.30.40CNAME    s2.example.com    s1.example.coms1.example.com has a valid A record. If I go to s2.example.com I get the server's default virtual host.What is the correct way to achieve this? Am I doing this wrong by attempting this via the DNS records? Do I need to set up a ServerAlias in the virtual host for s1.example.com instead?
Despite adding a CNAME record for a subdoman, the webserver is showing the server's default host
apache;dns;virtualhost
No. Sorta. It appears, you are, in effect, trying to use DNS as a redirect. That does not work.If this is what you are trying to do, you will need to add your s2.example.com site to your web server and put in a redirect from one to the other into an .htaccess file or better yet, just map the s2 site file system directory to the s1 directory.The reason why you are getting a so-called default site, is because if a site does not exist on Apache, it will return the first site created. For some Apache installs, this is a catch-all site. For the others, it is the first site you create yourself.