Multiple Virtual Hosts on Localhost of Apache / WAMP

Submitted by Anonymous (not verified) on Sun, 10/24/2010 - 13:58

You want to test multiple domains/sites on your local computer. Each site need to run on root level without urls without subdirectory. You have to create multiple vhosts. For each virtual host creata an entry in windows host file: hosts
Run a text editor as administrator to have right to make changes under windows.

C:\Windows\System32\drivers\etc\hosts :       www.mysite1.example       www.example.ku

httpd.conf :


    DocumentRoot C:\web\mysite1\public_html
    ServerName www.mysite1.example

    DocumentRoot C:\web\mysite2\www
    ServerName www.example.ku

    DocumentRoot C:\web
    ServerName localhost

Add new comment