Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

windows 7 Hosts file...

httpd-vhosts file... MY-IP-IS-HERE is my actual IP...

NameVirtualHost MY-IP-IS-HERE

<VirtualHost MY-IP-IS-HERE>
 DocumentRoot "E:/Web Server/xampp/htdocs/test/ajaxblog"
 DirectoryIndex index.php index.html index.html index.htm index.shtml

For some reason, when I go to or it loads E:/Web Server/xampp/htdocs/ instead of loading E:/Web Server/xampp/htdocs/test/ajaxblog and I cannot figure out how to get virtual host to load anything deeper then my root directory. Am I doing something wrong? I am using Apache or Xampp on Windows 7

share|improve this question
What does your error/access log say ? – Iain Jan 31 '11 at 12:18
up vote 1 down vote accepted doesn't work because you don't have a ServerAlias setup for

share|improve this answer
hello I have added ServerAlias but it still loads my root directory instead of root/test/ajaxblog any ideas? – JasonDavis Jan 31 '11 at 11:17
You have quotes around your document root; Try removing them... – Jacob Jan 31 '11 at 11:53
You need the quotes as you have spaces in your path. I don't think it is that. – dunxd Jan 31 '11 at 12:25
Wasn't paying attention, your correct. – Jacob Jan 31 '11 at 12:28

In addition to Jacobs answer on adding a ServerAlias, you should restart Apache to make the change take effect. Make sure that you have not double ServerName entries in your virtualhost configuration.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.