How to make a local domain alias

Tagged:  

Add in httpd.conf:

<VirtualHost 127.0.0.1>
   ServerName mysitename.local
   DocumentRoot E:\path\to\files
</VirtualHost>

Add in C:\WINDOWS\system32\drivers\etc\hosts :

127.0.0.1 mysitename.local

 

Restart Apache.

Now if you write mysitename.local in firefox it will take you to whatever is in E:\path\to\files.

 

Later edit:
You may also have to:
uncomment LoadModule rewrite_module modules/mod_rewrite.so
put in this line: NameVirtualHost 127.0.0.1