Sign up ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

This question already has an answer here:

I thought I was doing it right but obviously ... not

in C:\Windows\System32\drivers\etc\host       myDomain

Question 1 : why doest it work for 'myDomain' (myDomain leads to localhost) but not '' ? Everytime I add dots to the name, it is not recognized ( is an error)

in Apache conf :

<VirtualHost *:80>
    DocumentRoot "C:/wamp/www/myproject/web"
    ServerName myDomain
ServerAlias myDomain
    <Directory "C:/wamp/www/myproject/web">
    AllowOverride All
    Allow from All

if I type in a browser : http//myDomain => I am in the documentRoot but I cannot access directly to what is in the web folder :

Obviously there is something I did not understand, I thought that using the virtual host name (myDomain) I would be in the web folder.

Question 2 : what is wrong ?

Thank you for your help

share|improve this question

migrated from Apr 8 '13 at 23:47

This question came from our site for professional and enthusiast programmers.

marked as duplicate by HopelessN00b Feb 25 at 6:54

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

1 Answer 1

up vote 0 down vote accepted

Because is a different Domain than myDomain. Using in the hosts-file and your Apache config should do the trick.

By the way: One of ServerName or ServerAlias should be enough (i.e. leave your ServerName as it is and edit ServerAlias to say

share|improve this answer

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