Super User is a question and answer site for computer enthusiasts and power users. 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 have been using my local machine as a web server for a while, and I have several websites set up locally on my machine, all with similar Vhost files like the one seen here

/etc/apache2/sites-available/john.smith.com:

<VirtualHost *:80>
RewriteEngine on
RewriteOptions Inherit

ServerAdmin www-data@john.smith.com
ServerName john.smith.com
ServerAlias www.john.smith.com
DocumentRoot /home/john/smith

# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
LogFormat "%v %l %u %t \"%r\" %>s %b" comonvhost
CustomLog /var/log/apache2/access.log comonvhost
</VirtualHost>

then I set up the /etc/hosts file like so for every Vhost:

192.168.1.100     www.john.smith.com       john.smith.com
192.168.1.100     www.jane.smith.com       jane.smith.com
192.168.1.100     www.joe.smith.com        joe.smith.com
192.168.1.100     www.jimbob.smith.com     jimbob.smith.com

Now I am hosting my friend's website until he gets a permanent domain. I have port forwarding set up to redirect port 80 to my machine, but I don't understand how the global ip fits into all of this. Do I for example use the following web site addresses (assume global ip is 12.34.56.789):

12.34.56.789.john.smith
12.34.56.789.jane.smith
12.34.56.789.joe.smith
12.34.56.789.jimbob.smith
share|improve this question

migrated from stackoverflow.com Oct 4 '12 at 0:46

This question came from our site for professional and enthusiast programmers.

You must log in to answer this question.

Browse other questions tagged .