Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I develop on my local computer using wamp. When I start a new project I add a new virtual host entry to my httpd.conf file like so:

ServerName localhost:80

# DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this directory, but
# symbolic links and aliases may be used to point to other locations.
#DocumentRoot "c:/wamp/www/"
    ServerName localhost
    DocumentRoot "c:/wamp/wwwjack/"

    ServerName fr.local
    DocumentRoot "c:/wamp/fr/"

    ServerName gg.local
    DocumentRoot "c:/dev/gg/"

    ServerName codeignite.local
    DocumentRoot "c:/wamp/wwwcodeigniter/"

Periodically I would like to open up port 80 on my local network to give folks a preview of what I'm working on. I'm not talking about hosting a website from my home computer, just giving a quick snapshot.

After forwarding the port to my local IP, how do I setup so that a user only needs to type in my ip address and they see the virtual host I would like them to view? I would rather them not have to edit their host file for this.


share|improve this question

closed as off-topic by HopelessN00b Jan 15 '15 at 0:17

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions should demonstrate reasonable business information technology management practices. Questions that relate to unsupported hardware or software platforms or unmaintained environments may not be suitable for Server Fault - see the help center." – HopelessN00b
If this question can be reworded to fit the rules in the help center, please edit the question.

up vote 1 down vote accepted

You can't the way you are doing it. They'd have to be vpn'd into your network for that to work. And even if they were you'd have to use your lan side address, not your local loopback (

When apache gets the request it will try to match it with the vhost, but none of them will match.

share|improve this answer
Could you recommend a solution for me? Or if the solution is much more complicated i'll just keep continue as I have been and upload it to a public server...was just hoping to cutdown on that time. – Rapture Feb 3 '11 at 0:18
What you want to do is not terribly complicated, but to serve up the app you want per customer, you can't have multiple vhosts on the same ip, unless you use dns and ServerName maps to the name the customer is using to visit the site. For the time being I would continue to upload your sites, and learn a little more about NameVirtualHost. Once it clicks you will think of a number of ways to do what you want. – Nathan Powell Feb 3 '11 at 2:03

Another option is to get a domain, and use DNS for your app-serving. So...

Set the names to be your home address. You'll have to change your VHost descriptions to accommodate (and your code must accept it too), but it would work.

share|improve this answer

I think you could use the No-IP service ( to forward your ip to your box. Maybe you could then add the noip address to the vhosts list. Not sure though. Good luck!

share|improve this answer
If you are unsure, you should refrain from answering. – Nathan Powell Feb 3 '11 at 0:08
It doesn't hurt to try things... – Paul Feb 3 '11 at 0:18
I mean, your answer didn't even suggest a solution. Only telling him he couldn't do it. – Paul Feb 3 '11 at 0:19
If you end a post with "Not sure" you should probably keep it to yourself. – Nathan Powell Feb 3 '11 at 2:06

Not the answer you're looking for? Browse other questions tagged or ask your own question.