Ubuntu 18.04 Apache2 Virtual Host is showing main website
I am attempting to make a subdomain for my website and I have created a virtual host, when I access the website subdomain.mydomain.com It show the same page as mydomain.com. Below is my virtual host.
<VirtualHost subdomain.mydomain.com:80> DocumentRoot /var/www/subdomain ServerName subdomain.mydomain.com ServerAlias www.subdomain.mydomain.com <Directory "/var/www/subdomain"> </Directory> </VirtualHost>
This is placed in a separate virtual host file I have read a few other topics on here that say place it in the default host file, after trying that I am still having the same issue. Any help would be greatly appreciated.