JLBN – Setup Virtual Hosts on WAMP

There are too many ways to setup Virtual Hosts for both local and global access, so here, in this setup Virtual Hosts guide for WAMP, we only show the most basic method to get you going 😉

In this setup Virtual Hosts guide for WAMP, we will desmontrate to setup 1 localhost, 1 local domain (domain), 2 local subdomains (sub1 and sub2), 1 domain (domain.com), and 2 subdomains (sub1.domain.com and sub2.domain.com)

Even you don’t have real domain, you can still follow this guide to the section for setting up Virtual Host without domain 😉

Note: Even this guide is used for Wampserver, you can apply this method on other wamp package such as Xampp, EasyPHP, so on. Just make sure to select correct file(s) in proper location(s) 😉

[Read more…]

72 thoughts on “JLBN – Setup Virtual Hosts on WAMP

    • February 3, 2015 at 11:50 am

      Sorry for the inconvenient 🙁
      All the guides are still there and they will work with any WAMP package, even the latest WAMP version, but some links might be broken… since there is no donation or support in any form at all recently, so we have no choice but devoting most of our free time into something else… but, we will find and fix those broken links asap. Please, post the specific broken link(s) so we can fix them first. Thanks.
      Please, check back often and let us know if you find what you’re looking for or need help on some specific guide 🙂

  • August 7, 2014 at 9:48 pm

    I am learning how to build multiple subdomains in my WAMP server.

    everything was cool until after I modify my pc’s hosts file, I could not hit the local ip address of the server where my site was running.

    However, I added the web ip address for each subdomain and how I can see my subdomains when I access it from my external pc.

    This is so awesome. Thank you so much for this article.

    I am going to request my IT guy to add the subdomains to the DNS so other folks outside my company can see the subdomains.

    I am still learning but this was great.

    Thanks again

  • May 21, 2014 at 5:20 am

    Hi Team,

    I would like to create subdomain with 1 domain
    Thanks for the Awesome links to the Tutorial on domain and Subdomain

    my first problem

    I have set 1 domain that is

    and subdomain as

    but when i type in subdomain in address bar
    i get returned to same page as domain name

    I want this checked

    Please help me stuck with this issue for week now

    my 2nd problem is my wordpress website does not open in chrome but opens correctly in IE and Morzillaa

    Please help waiting for your response and building website

    • July 10, 2014 at 1:48 pm

      Hello webmaster. I like your blog about PHP Zinc Blog Archive PHP: Installation of WAMP on wiwnods.I was wondering, i am planning to make a blog for myself. I want to use wordpress like you. Where did you get your template? If you post your answer below mine,then i will read this in the next couple of day’s.Thanks Schuimblusser

  • May 3, 2013 at 12:08 am

    Fine way of describing, and nice piece of writing to obtain data concerning my presentation topic, which
    i am going to deliver in school.

  • March 2, 2013 at 12:01 pm

    I wanted to present this post, “JLBN – Setup
    Virtual Hosts on WAMP : JLBN” all-things-go
    together with my personal pals on facebook .com. Ijust wished
    to disperse your fantastic writing! Thanks a lot, Tamara

  • February 21, 2013 at 5:36 am

    “JLBN – Setup Virtual Hosts on WAMP : JLBN” was indeed genuinely enjoyable and beneficial!
    In the present day universe that is very difficult to do. Regards, Noemi

  • January 29, 2013 at 1:33 am

    I’m having trouble getting my virtual hosts files set up right. I have a domain through no-ip, so I essentially have http://www.domain.no-ip.org as my domain. Is this a problem, or should it work if I replace domain with domain.no-ip and .com with .org?

    Also, where it says

    ServerAlias domain.com domain

    Is the second domain reference referencing the name of the folder on the server, or is it a data type?

    • February 8, 2013 at 11:21 pm

      Steve, no-ip already re-route your IP so you will not able to setup your personal domain, and that’s why I never recommended any Wamp user to have service with no-ip.

      The second entity refer to local domain, so if you have that line like this:
      ServerAlias my_real_domain.com my_local_domain
      Then when you have these URLs in the browser:
      They both will open the same website/content of the folder you setup in VH for that domain, in this case is my_real_domain.com and my_local_domain; the different is my_real_domain.com will going through the Internet to your my_real_domain.com hosting then re-route back to your computer while my_local_domain does not need the Internet 😉 thus if http://my_local_domain does not work, you have issue either your Wamp does not run or your VH script is not completely correct.

  • August 29, 2012 at 3:57 am

    First 2 steps only solved the problem..

  • June 7, 2012 at 6:53 am

    Great tutorial.

    Even better – it worked 😉

    Searched everywhere for an explanation that I could understand, even WAMP site!

  • March 23, 2012 at 5:08 am

    thanks JL for the reply and help!
    i could just not bother with setting up a subdomain since it’s not that simple to access it for network users lol =)
    but anyway – thank you for your support – i learned s/t new from you great site =)

  • March 21, 2012 at 7:08 am

    Hi BN
    the above didn’t really help.
    but i done everything from scratch and now i can see convert.intranet:85 correctly on the actual server, but not on any other PC on the network. is there another way to make it accessible from local network rather than adding each subdomain to hosts file on each PC on the network?

    • March 22, 2012 at 8:24 pm

      Elen, the hosts file serves as a simple DNS server and since it’s simple, it can only see what it has but can’t propagate what it has; thus, if you can’t or don’t want to edit the hosts file in each LAN PC, you have no choice but installing DNS server which is more complicated to setup and might involves risk; for example, if not setup properly, your local domain(s) might be accessible by… your neighbor(s)!!! Some people don’t really care about it, but some do since they simply want their local domain(s) stay within their LAN or they just don’t want others known about their works in progress… And be careful when trying some DNS server software since some people might advertize their software work in LAN only but it’s actually not… By the way, some routers can be setup as DNS server, and again, it’s not a simple setup… 🙁

Leave a Reply