Page 1 of 1

Virtual host behaving strangely

PostPosted: 27. July 2010 19:53
by martin05rc
I setup several local domains for development. For local development domains I use the "local" fake TLD. So, for example, I could setup "microsoft.local".

One of the domains I have is behaving strangely. Continuing with the above hypothetical example, if I type "http://microsoft.local" or "http://www.microsoft.local" it immediately routes to "http://www.microsoft.com". This, by the way, is browser-independent. I tried Chrome, IE, Safari and Firefox. Same deal.

Code: Select all
hosts file relevant content:
127.0.0.1  test.local
127.0.0.1  www.test.local

127.0.0.1  microsoft.local
127.0.0.1  www.microsoft.local


Code: Select all
httpd-vhosts file relevant content:
# ======================================== test.local
<VirtualHost *:80>
  ServerName test.local
  ServerAlias test.local *.test.local
  DocumentRoot D:/localhost-websites/test/public_html
  ErrorLog D:/localhost-websites/test/logs/access.log
  CustomLog D:/localhost-websites/test/logs/error.log combined

  <Directory D:/localhost-websites/test>
    Options Indexes FollowSymLinks
    AllowOverride All
    Order allow,deny
    Allow from all
  </Directory>
</VirtualHost>

# ======================================== microsoft.local
<VirtualHost *:80>
  ServerName microsoft.local
  ServerAlias microsoft.local *.microsoft.local
  DocumentRoot D:/localhost-websites/microsoft/public_html
  ErrorLog D:/localhost-websites/microsoft/logs/access.log
  CustomLog D:/localhost-websites/microsoft/logs/error.log combined

  <Directory D:/localhost-websites/microsoft>
    Options Indexes FollowSymLinks
    AllowOverride All
    Order allow,deny
    Allow from all
  </Directory>
</VirtualHost>


Any thoughts on what might be going on? "tests.local" works just fine, no issues whatsoever. However, "microsoft.local" instantly routes to "microsoft.com". I can't get "microsoft.local" to even flash a page on the screen.

Thanks,

-Martin

Re: Virtual host behaving strangely

PostPosted: 27. July 2010 22:24
by JonB
Bill is everywhere...

:mrgreen:

Re: Virtual host behaving strangely

PostPosted: 28. July 2010 06:31
by martin05rc
I am using "microsoft.local" as an example. I can't post our actual site URL.

-Martin

Re: Virtual host behaving strangely

PostPosted: 28. July 2010 17:30
by JonB
err- I was joking :shock:

It sounds like a DNS problem, not an Apache one. Perhaps a browser 'tweak/add-in' that guesses URL's -- very popular right now.

or

if you have your own DNS servers or run your (real) domain on equipment that is on your LAN - you might look at remappings of .local as a special case. (also/plus in that case look in Network Connections, check the Internet Protocol properties > Advanced > DNS to see if any special settings are present,)

What browsers have you tested with?

I'd install one you are not currently running and see what happens.

Good Luck
8)