20 thoughts on “Xampp Virtual Host (Multiple Domains) Tutorial

  1. one more thing.. this is only for local / lan connect, if you can tell me what is for an external to make people see my homepage without an local connection device ! do i really need an domain? what free way is there for xampp? or maybe other :|

  2. @Enixteam Hi, thanks for the kind words, If you don’t mind about the domain suffix, you can register a .co.cc domain for free and set the A records to point to your IP address. Then in your xampp config set the vhosts instead of .com to.co.cc This way when people go to example.co.cc they are redirected to your Apache install which then reads the headers and sees it is example.co.cc and points them to your folder where the index is. Hope this helps.

  3. I’ve setup xampp on a spare client on a windows 2000 server network. this computer is beau.shopsite.local – my website folder is d:/sites_1/ on beau and this is my ‘test’ server for dreamweaver. dreamweaver is on a laptop client on the same network called bruv.shopsite.local and my local website files are on this laptop. my website is pets-medic.co.uk on the internet using a remote server and the testing site is pets-medic.local do i use the same config?- thanks

  4. So all I have to do to make it public (after your tutorial) is just point my domain’s A record (from GoDaddy) to my IP?

  5. @FethrdWlf That is correct. But after you have set the DNS records to point to your IP make sure you remove any information you added to your HOSTS file otherwise you will think it is working when maybe it isn’t. Also don’t be too quick to dismiss it working since DNS records more often than not suffer a large amount of propagation when updating them.

  6. @jawsykilla Thank you! …so now just ONE more question :). Let’s say I have two domains. I want both to point to different directories such as "…/htdocs/a" and "…/htdocs/b". The way I see it, both would only be able to point to the main "htdocs" folder… Is there any way around that?

  7. @FethrdWlf If you watch the video it explains everything. Apache has a nifty way of dealing with multiple domains using what is known as virtual hosts. If you have 2 domains pointing the same IP then Apache will interpret the domain names before going to a document root. So you can configure virtual hosts so 1 domain goes to /htdocs/a/ and the other goes to /htdocs/b/ . The video explains it all. Hope I helped.

  8. @FethrdWlf OOOooookay. Yeah, I forgot about that part of the video… I was stuck on the hosts file and what not, thank you!

  9. You sir are Brilliant. Thanks very much for this tutorial. Can;t wait for you to do a mail server tutorail when using vhosts :)

  10. Hi, I’ve followed your instructions and I am only seeing servers directory list, what am i doing wrong? I followed your instructions to a tee.

  11. hi can you please explain how to make my domain name to point to my localhost ip adress do i need to add ip adress to Name Servers on my registars website? or how do i go about it any help would be great

  12. Hey, on your domain DNS manager you have to create some a records, 1 for "@" and one for "w.w.w" (Without the periods), which point to your external IP address. The Nameservers remain the same as default from your domain provider. Then if you are behind a router on your home network you port forward port 80 to your local IP of the server/computer you are hosting your site from. Hope this helps.

Comments are closed.