httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Razi Khaja <razi.kh...@gmail.com>
Subject Re: [users@httpd] Help - Name Server - Maybe
Date Sun, 01 Feb 2009 02:48:17 GMT
> For the last 6 months I have fiddled around trying to make Apache connect to
> the web or the web connect to Apache.  It does just fine on my home network
> when I type in localhost!  But if I type in www.michaelsrogers.com it
> doesn't work.
>
> The address above is associated with the name server
> somkey.montanavision.net and the Apache is on my home computer.  I am
> running XP Home SP3, and there a router between me, and the web.
>

On windows, search for a file called hosts, it should be in a place
like C:\system32\drivers\etc\hosts (I dont have a windows box so Im
not sure if this is exactly where to find it).

The contents of the hosts file should look like:

127.0.0.1       localhost

This says that that 'localhost' is an alias for the IP number 127.0.0.1

You will want to create another entry in this file that also points to
the IP number 127.0.0.1, so that your your file looks like:

127.0.0.1       localhost
127.0.0.1       www.michealrogers.net

You might also want to include

127.0.0.1       michealrogers.net  (in case you ever want to type the
URL without the www).

Alternatively, you can put all of this on one line:

127.0.0.1       localhost michealrogers.net www.michealrogers.net

The thing to note about this hack is that your name server is never
contacted in order to do the IP to domain name translation.
This should allow you to see your website, hosted on your home
computer, from home, using your domain name rather than localhost.
Hope that helps.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message