LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 03-23-2006, 12:23 AM   #1
Manashi
LQ Newbie
 
Registered: Jan 2006
Posts: 27

Rep: Reputation: 15
Question http://localhost Page not found


hi
when i am givein http://localhost in browser its giving page not found..
what is the error and how to correct it...
i hav reinstalled linux yesterday...
in systemsetting/sevices.. i found httpd is stopped
when i tried to restart it it gav a messeage "FAILED"
waitin for the reply...
 
Old 03-23-2006, 02:22 AM   #2
timmeke
Senior Member
 
Registered: Nov 2005
Location: Belgium
Distribution: Red Hat, Fedora
Posts: 1,515

Rep: Reputation: 61
If httpd isn't running, you cannot expect to get a response on port 80 (HTTP) of the localhost network interface (this is what you're asking for in your browser).
httpd needs to be running and listening to port 80 on localhost for your browser to display something.

Is the httpd.conf file overwritten or deleted by the re-install?
Can you try to determine (ie from the log files in /var/log) why httpd doesn't start?
Maybe it was stopped inappropriately, so you might want to clean up the lock file and pid file
in /var/run or use
Code:
/sbin/service httpd restart
"restart" first does "stop", then "start". By doing a "stop", the PID file and lock thingies may get cleaned up.
 
Old 03-23-2006, 07:04 AM   #3
nitinatindore
Member
 
Registered: Dec 2004
Location: India
Distribution: Mandrake, Mandriva, PclinuxOS
Posts: 114

Rep: Reputation: 15
Quote:
i found httpd is stopped
when i tried to restart it it gav a messeage "FAILED"
waitin for the reply...
You need to start a stopped service, not Restart
You may try executing this command
# service httpd status
if status is stopped
# service httpd start
or
# /etc/init.d/httpd start

Aslo check that if the server is running on port 80 or not or you need to specify the port explicitly in the URL. Also ensure that there is an index.html file in the document root directory [usually /var/www/html]
 
Old 03-23-2006, 11:46 PM   #4
Manashi
LQ Newbie
 
Registered: Jan 2006
Posts: 27

Original Poster
Rep: Reputation: 15
Question Re : http://localhost page not found

hi ..
thanks 4 the reply..
i tried the solution that u gav bt still the connection is FAILED...
i checked in System Setting/server setting/Http/server

there are 2 things :- Lock File ...var/lock/httpd.lock
Pid File..../var/run/httpd.pid
I checked for these two files its not present...
apart from that...
i checked in /etc/httpd/conf where httpd.conf file is present ...i found there is another file httpd.conf~
is it means the this file has got overwritten + missing of Pid file and lock file the problem is comming..
 
Old 03-24-2006, 01:46 AM   #5
timmeke
Senior Member
 
Registered: Nov 2005
Location: Belgium
Distribution: Red Hat, Fedora
Posts: 1,515

Rep: Reputation: 61
The missing PID file and lock file simply mean that httpd is probably not running at all (or the
service was incorrectly stopped). Their abscence is certainly not a reason for not being able to launch
the httpd service.

httpd.conf~ suggests indeed that someone opened this file in an editor and made some changes. The backup file, saved by the editor automatically, is the httpd.conf~ file.
Is there a httpd.conf present as well? httpd service absolutely needs a file called "httpd.conf", not "httpd.conf~".

If there isn't, then I advise you to look at httpd.conf~ and, if it contains useful settings, rename it to httpd.conf and try to start the httpd service afterwards.

If there is already a httpd.conf, then you'll need to look at the logs (in /var/log somewhere) for details as to why httpd won't start. You can then try using "diff" to compare httpd.conf to httpd.conf~ and see which of the file is most useful.
 
Old 03-24-2006, 03:20 AM   #6
Manashi
LQ Newbie
 
Registered: Jan 2006
Posts: 27

Original Poster
Rep: Reputation: 15
Question Re : http://localhost page not found

in /var/log/httpd there is a file name error_log

the last 2 error recorded in that file :-

[Wed Mar 22 19:21:39 2006] [error] [client 127.0.0.1] File does not exist: /var/www/html/favicon.ico

[Wed Mar 22 22:38:17 2006] [notice] caught SIGTERM, shutting down

i hav installed linux in my system a week before...
and i am gettin this problem from 23rd morning...
 
Old 03-24-2006, 04:24 AM   #7
timmeke
Senior Member
 
Registered: Nov 2005
Location: Belgium
Distribution: Red Hat, Fedora
Posts: 1,515

Rep: Reputation: 61
The first error, the "File does not exist" can easily be corrected for. Simply create such a file (take whatever icon you like) or stop using the client.
It is a bit weird that a client app shuts down because of a simple missing icon.
Apparently, however, the client sends out a signal SIGTERM to the parent (httpd). httpd responds to this by
shutting down (which may be normal behaviour).
So, it seems that httpd gets started all right, it just stops because a child process (client) stops unexpectedly.

However,
http://linux.derkeiler.com/Newsgroup...3-12/2383.html
indicates that's it's more or less of an optional file that browsers sometimes look for.
So, the SIGTERM may actually come from another problem.
 
Old 03-27-2006, 02:05 AM   #8
Manashi
LQ Newbie
 
Registered: Jan 2006
Posts: 27

Original Poster
Rep: Reputation: 15
hi...
its workin fine now....
 
Old 03-27-2006, 03:34 AM   #9
Wim Sturkenboom
Senior Member
 
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Slackware 10.1/10.2/12, Ubuntu 12.04, Crunchbang Statler
Posts: 3,786

Rep: Reputation: 282Reputation: 282Reputation: 282
OK, can you tell us what the problem was and how you solved it. Others might have the same problem.

With regards to favicon.ico: some browsers request that file every time they request a page from a website (firefox), some only under certain circumstances (IE; I never fgured out when).
 
Old 04-05-2006, 11:19 PM   #10
Manashi
LQ Newbie
 
Registered: Jan 2006
Posts: 27

Original Poster
Rep: Reputation: 15
hi...
there was a problem in the httpd connection + httpd.conf file got overwritten so bkaz of that its was not workin...
i reinstalled all the files
Now its absolutely workin FINE...
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
apache: http://localhost (work) http://ipaddress (not working) sarmad Linux - Newbie 7 02-05-2013 07:47 AM
apache http://localhost/mysite ---> http://localhost/mysite/index.php how? ilnli Linux - General 8 06-04-2005 03:23 PM
http://localhost:631 zaicheke Linux - Software 5 08-01-2004 01:13 PM
http://localhost does not work! Rajasekhar Atte Linux - Networking 1 12-17-2001 03:06 PM
Where is http://localhost ????? amp2000 Linux - General 13 11-21-2001 02:43 PM


All times are GMT -5. The time now is 08:27 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration