Try creating a server alias and restart apache. <VirtualHost 192.168.1.1 172.20.30.40> DocumentRoot /www/server1 ServerName example.com ServerAlias www.example.com</VirtualHost>
Sent from my iPhone > On Jan 30, 2014, at 1:04 PM, Josh Stratton <strattonbra...@gmail.com> wrote: > > I setup an apache server a while back without a virtualhost and got > everything working fine. I added a virtualhost for my wife and it seems to > work fine on desktops, but on our phones (an iphone and a windows phone), > both redirect to my root site if the user adds www to the domain in the > address bar. I assume it's just some mistake in my virtualhost setup, but I > don't understand why it works on desktop but not mobile. I added a > ServerAlias to include the www prefix onto the domain and restarted apache, > but it doesn't seem to make a difference. I always get the "root" (hope I'm > using the right naming convention) host back.