localhost isnt working!
Moderator: General Moderators
localhost isnt working!
Up until recently, http://localhost/ would bring up the index of my local apache server. A while back I installed apache, php and mysql on my computer. If I ever wanted to test a script, typing in http://localhost worked fine. But now all of the sudden it wont work when I type it in. My computer treats it as if it were a real web address, and when it cant find it on the web it brings up one of those Lycos search pages where the address you typed in is presented as a search query. I do know that apache is somewhat working, because when i go to http://localhost/index.php it brings up the index of my local server. All other pages work if I type it in this way too, but when an address is typed in anything but manually (after logging in, a redirect ect.) they don't. Can anyone tell me what the problem is and how to fix it? Thanks.
That means your apache is installed ok. You must search for Directory Index in httpd.conf (missed this) file and you should find index.html Just add (blank and then index.php) index.php and apache will load index.php by typing the folder name in the address bar.
Last edited by anjanesh on Sun Jun 13, 2004 2:08 am, edited 2 times in total.
Out of interest if you goto http://127.0.0.1 does that make any difference?
Im using windows XP with apace 1.3
And I just discovered something new:
When I went to the top of this post, I clicked on the second localhost link I wrote (the one without the slash at the end). It worked when I clicked on it (meaning it brought up my index.php)! Then I tried typing it in manually in the address bar. It started not working again. Then when I clicked that link it suddendly stopped working.
The first link (with the slash at the end) never worked from the start. Could it be my internet browser (im using IE)?
And I just discovered something new:
When I went to the top of this post, I clicked on the second localhost link I wrote (the one without the slash at the end). It worked when I clicked on it (meaning it brought up my index.php)! Then I tried typing it in manually in the address bar. It started not working again. Then when I clicked that link it suddendly stopped working.
Last edited by snpo123 on Sun Jun 13, 2004 2:31 am, edited 1 time in total.
tried that, and it didnt work.
I also noticed that the other files that were not workng didnt work because of a bug in my php scripts. That means that all files on my apache server work fine when I type them in. Now the only problem that exists is when I go to http://localhost it doesnt bring up my index page. But when I go to http://my IP address or http://127.0.0.1 it works fine and brings up my index page. Does this make the problem any clearer?
I also noticed that the other files that were not workng didnt work because of a bug in my php scripts. That means that all files on my apache server work fine when I type them in. Now the only problem that exists is when I go to http://localhost it doesnt bring up my index page. But when I go to http://my IP address or http://127.0.0.1 it works fine and brings up my index page. Does this make the problem any clearer?
- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
sounds like your hosts file is screwed up..
The great Google knows all: http://www.accs-net.com/hosts/how_to_use_hosts.html
try restarting.. after that.. I dunno.. format?
The great Google knows all: http://www.accs-net.com/hosts/how_to_use_hosts.html
try restarting.. after that.. I dunno.. format?