View Full Version : Apache problem
dabbler
09-10-2003, 12:12 AM
Hi guys! I had a MAJOR computer prob - but I think I sorted most things out.
BUT - I re-installed Apache, and if I use 127.0.0.1 in the address bar then OK - it's set up OK, but "localhost" just gives me a "page not available" error.
I looked in the config file, but I cannot see what I've done wrong this time.
I set Document root to the folder where my files will be (and put a test html file there).
Any suggestions? Or do I just use 127.0.0.1 in the address bar?
dabbler
09-10-2003, 06:50 AM
Well, everything seems to be working OK as long as I use 127.0.0.1 with everything.
Got PHP and mysql working again - so I guess it's OK.
Dynasty
09-10-2003, 08:02 AM
Chances are that the problem is to do with a file known as the HOSTS file, on nt/2000/xp/2003 systems it's located in the windows\system32\drivers\etc folder and it contains mappings for ip addresses.
The contents of the file should be something like this:
# Copyright (c) 1993-1999 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
# 102.54.94.97 rhino.acme.com # source server
# 38.25.63.10 x.acme.com # x client host
127.0.0.1 localhost
As you can see that maps 127.0.0.1 to localhost, if this file is missing then the mapping doesn't exist. All you have to do is make a notepad file, put that lot in it, and save it using the name HOSTS, making sure not to save it as HOSTS.txt then put it in the above folder, that should sort it.
:)
dabbler
09-10-2003, 08:13 AM
That was a most lucid and effective explanation - thank you.
Unfortunately the folder does contain the file exactly as you printed it. So it seems my problem lies elsewhere.
Thanks for trying, though, and I learned something very useful there, even if it didn't help with this particular problem.
ishan
11-09-2005, 06:09 AM
I think the problem lies in ur httpd.conf file. I had a same problem before, then i changed to a precofigured WAMP (Windows, Apache, Php, MySQL) Server called WAMP5 (http://wamp5.com). After that i never had any problem. You dont need to use PHP and MySQL, i in order to get it working.
vBulletin® v3.7.2, Copyright ©2000-2008, Jelsoft Enterprises Ltd.