Jun 03 2010

How To Setup Virtual Host on Local Web Server using Apache on Windows

there are 2 files that needed to be edited in order to create virtual host on local computer .

1.  apache side  :


enable for include httpd-vhosts.conf :

Include conf/extra/httpd-vhosts.conf

./apache/conf/extra/httpd-vhosts.conf    , to configure the virtual host

ex :



DocumentRoot “E:/folder/to/web1/”

ServerName web1.local



DocumentRoot “E:/folder/to/web2/”

ServerName web2.local


2. windows site, for the resolving dns

C:\Windows\system32\drivers\etc\hosts       creation.dedy.com       balivilla.local       web1.local       web2.local

then restart apache


  • By ekozul, June 22, 2010 @ 8:30 am

    thanks for sharing, it’s very usefull

  • By Omar Salim, November 14, 2011 @ 10:20 am

    makasih.. sangat bermanfaat

  • By Website Builder, July 4, 2012 @ 6:10 pm

    I used to be suggested this website by means of my cousin. I am now not certain whether this submit is written by him as no one else understand such unique approximately my trouble. You’re amazing! Thank you!

Other Links to this Post

RSS feed for comments on this post. TrackBack URI

Leave a comment

WordPress Themes