I have got a strange problem.
I have two domains: mysite.co.uk and mysite.com, which need to point to the same directory on my server. The VHost for mysite.co.uk works perfectly. However, mysite.com will not work.
When I re-start apache I see no errors. When I enter the domain, it is reaching the correct server but showing me the index file in /var/www, instead of re-directing to /var/www/html/mysite.co.uk/web/
Is there an error with my code? It is EXACTLY the same as what appears on the configuration for mysite.co.uk, so I am very confused as to why it is not working properly.
<VirtualHost *:80> ServerName mysite.com DocumentRoot /var/www/html/mysite.co.uk/web/ ServerAlias *mysite.com </VirtualHost>
<VirtualHost *:80> ServerName *.mysite.com DocumentRoot "/var/www/html/mysite.co.uk/web/" </VirtualHost>