I would like to have two virtual hosts with different subdomains point to the exact same site. I want to do this so I can switch between apache commands without having to keep restarting apache.
OK, so I tried creating two vhost declarations, but I found that [(site_url)] is not updated to the new one I am adding. This means that Wayfinder does not use the second subdomain. Here is an example:
<VirtualHost *>
DocumentRoot /data/websites/test.com/public_html
ServerName testcom.foo.dnsalias.net
</VirtualHost>
<VirtualHost *>
DocumentRoot /data/websites/test.com/public_html
ServerName secondtestcom.foo.dnsalias.net
</VirtualHost>
Everything works great when using
http://testcom.foo.dnsalias.net, but when I try to use secondtestcom.foo.dnsalias.net, the first page loads ok, but the <base href... contains testcom.foo.dnslias.net. This makes all links go back to the first subdomain.
I hope that makes sense. Note that I don’t want two different sites. I want the same site but two subdomains. I am using apache2.
I am using 0.9.6.1 and friendly URLs.
Any ideas? Thanks, Andy