PDA

View Full Version : http://localhost will not work..


Mhtml
12-26-2002, 05:14 PM
I can't load my pages using http://localhost I can using http://127.0.0.1 though. How can I get localhost to work?

ez4me2c3d
12-26-2002, 05:32 PM
check your host file, it should look something like... (thats all i can think is your poblem)
[#]# 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[/#]

Mhtml
12-26-2002, 06:40 PM
I've tried that. (hosts.sam)

ez4me2c3d
12-26-2002, 07:41 PM
no, t's actually just 'hosts' with no file extension. hmm, sorry man I don't know enough about setting up a web server on your PC to help.

Mhtml
12-26-2002, 08:06 PM
I don't know why it had the .sam extension but I have created one that doesn't have it, it is just hosts. But still my situation has not changed.

Thanks anyway.

arielex
12-28-2002, 02:32 AM
if you're using apache, just edit the httpd.conf

ServerName localhost:80

thats the line i found (apache2)

Mhtml
12-28-2002, 04:34 AM
Yeah that's all done. I am actually running apache of port 81 and IIS on 80. I have tried all of the apache stuff and all of the MS stuff. It works on my other computer but not this one so I'm guessing it may be a problem with the OS.

Mhtml
12-28-2002, 04:35 AM
But the weird thing is that I can successfully ping 127.0.0.1 , localhost and loopback . My browser just won't take me there.

firepages
12-28-2002, 08:34 AM
I assume you have tried http://localhost:81/ ?

Mhtml
12-28-2002, 08:41 AM
yes.

Mhtml
12-30-2002, 03:42 AM
It works now, I just booted up my computer and whent to load the invision board which came with php dev and it worked. It is always looking for localhost because I haven't told it otherwise I guess and now localhost works, loopback works, loop works, and I have iis, and php redirecting to their respective ports.

No idea why but I hope it stays this way ! :)

Mhtml
12-30-2002, 11:20 AM
It broke already... why must I use numers? :mad:

I am going to re-install 98 to see if it will work.. GRR!

Moderator Note: You have been edited. No swearing in our forums

Nairb
12-30-2002, 12:36 PM
How do you install apache/php/MySQL on your comp?

wap3
12-30-2002, 01:01 PM
Nairb --

go to somewhere like this and download the phpdev bundle. It contains those things.

:thumbsup: www.firepages.com.au (http://www.firepages.com.au)