LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices



Reply
 
Search this Thread
Old 05-23-2003, 07:43 PM   #1
matt3333
Member
 
Registered: Dec 2002
Location: Winnipeg, Manitoba, Canada
Distribution: Slackware
Posts: 371

Rep: Reputation: 30
http://localhost apache


Hey i installed apache and i was reading the manual for it on the internet and it says that if i go to http://localhost it should pop up and say it worked or something like that when i try it just says closed or something like that??? i nmap my self and it didnt show port 80 being open??? is there away to nmap port 80 so i know for sure port 80 is open???? thanx

Matt3333
 
Old 05-23-2003, 08:05 PM   #2
iceman47
Senior Member
 
Registered: Oct 2002
Location: Belgium
Distribution: Debian, Free/OpenBSD
Posts: 1,123

Rep: Reputation: 47
If you telnet to localhost port 80 you can check if it's really open
telnet localhost 80
if it's closed, you'll have to edit the httpd.conf file, inside there's an option where you can tell on what port to listen.
I think the file is in /etc/httpd/config/httpd.conf if you're using redhat, that is. Otherwise:
locate httpd.conf
 
Old 05-23-2003, 08:55 PM   #3
matt3333
Member
 
Registered: Dec 2002
Location: Winnipeg, Manitoba, Canada
Distribution: Slackware
Posts: 371

Original Poster
Rep: Reputation: 30
Ok i guess i dont have telnet install??? weird i thought i installed it anyways i used ssh i typed ssh localhost -D 80 and it loged me in so im guess it worked is there another reason why http://localhost doesnt work??`??
Thanx

matt3333
 
Old 05-23-2003, 09:01 PM   #4
iceman47
Senior Member
 
Registered: Oct 2002
Location: Belgium
Distribution: Debian, Free/OpenBSD
Posts: 1,123

Rep: Reputation: 47
look in the httpd.conf file, I mentioned it last post.
It can be your firewall too,look at the rules with iptables -L and check if port 80 isn't being blocked.
BUT: do check the httpd.conf file!
 
Old 05-23-2003, 11:27 PM   #5
matt3333
Member
 
Registered: Dec 2002
Location: Winnipeg, Manitoba, Canada
Distribution: Slackware
Posts: 371

Original Poster
Rep: Reputation: 30
ok what should i look for in httpd.conf im running mandrake 8.2 so i should probable check out commonhttpd.conf to eh?? hmmm when i type iptabels -L i get this big line of errors???? if u want me to post em here i will thanx for your help

matt3333
 
Old 05-24-2003, 02:06 AM   #6
MasterC
Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,612

Rep: Reputation: 64
Hi

When you http://localhost do you immediately get an error, or does it take a while? When you run:
ps aux
Do you see httpd listed? If not, then apache isn't running, start it. Either as root:
apachectl start
OR in your init.d directory (likely):
/etc/init.d/httpd start

Cool
 
Old 05-24-2003, 06:04 AM   #7
iceman47
Senior Member
 
Registered: Oct 2002
Location: Belgium
Distribution: Debian, Free/OpenBSD
Posts: 1,123

Rep: Reputation: 47
First check what MasterC said, if it's still not working,
you should look for this in httpd.conf:

# Listen: Allows you to bind Apache to specific IP addresses and/or
# ports, in addition to the default. See also the <VirtualHost>
# directive.
#
# Change this to Listen on specific IP addresses as shown below to
# prevent Apache from glomming onto all bound IP addresses (0.0.0.0)
#
Listen 127.0.0.1:80

Also, post the error's you're getting from iptables, maybe it's related
 
Old 05-24-2003, 03:03 PM   #8
matt3333
Member
 
Registered: Dec 2002
Location: Winnipeg, Manitoba, Canada
Distribution: Slackware
Posts: 371

Original Poster
Rep: Reputation: 30
Hmm interesting ok when i start apachectl i started it before and used apachectl update and apachectl restart but i didnt get anyerrors so i just figured it worked but just as u brought that up i checked out apacheclt extendedstatus and i got this error saying its not running after i just did apachectl start and got no errors:

[root@localhost root]# apachectl extendedstatus

looking up localhost
Making httpd connection to localhost
Sending httpd request.
HTTP request sent: waiting for reponse.
Alert!: Unexpected network read error: connection aborted.
Can't Access 'http://localhost/server-status'
Alert!: unable to access document.

Lynx: Can't access startfile

###################################

Anyone know why this is happening???
Oh and when i got to http://localhost it doesnt work like nothing happens
Ill post the iptables -L errors later when we figure out why this is happening maybe it is from iptables but ill post them later Thanx for all ur Help
thanx

Matt3333
 
Old 05-24-2003, 03:13 PM   #9
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 65
Is localhost defined in /etc/hosts? What happens when you:
ping localhost

If you don't have localhost in your hosts file next to 127.0.0.1 tehn add it. You could also try using http://127.0.0.1/
 
Old 05-24-2003, 03:34 PM   #10
matt3333
Member
 
Registered: Dec 2002
Location: Winnipeg, Manitoba, Canada
Distribution: Slackware
Posts: 371

Original Poster
Rep: Reputation: 30
Ok when i ping localhost it pings fine packets send and recived or w/e it works i checked out /etc/hosts and it looks like this:
127.0.0.1 localhost.localdomain localhost and thats all it says and i tried http://127.0.0.1 and i get connection to host 127.0.0.1 is broken??? what doesn this mean??? Thanx for responding so fast thanx


Matt3333
 
Old 05-24-2003, 03:42 PM   #11
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 65
You mention firewall rules. Have you tried temporarily flushing them:
iptables -F

You can restore the default rules by resrting iptables.
 
Old 05-24-2003, 07:26 PM   #12
matt3333
Member
 
Registered: Dec 2002
Location: Winnipeg, Manitoba, Canada
Distribution: Slackware
Posts: 371

Original Poster
Rep: Reputation: 30
Ok this is what i get when i type iptables -F and iptables -L:

[root@cd40509-a root]# iptables -F
/lib/modules/2.4.18-6mdk/kernel/net/ipv4/netfilter/ip_tables.o.gz: init_module:
Device or resource busy
Hint: insmod errors can be caused by incorrect module parameters, including inva lid IO or IRQ parameters
modprobe: insmod /lib/modules/2.4.18-6mdk/kernel/net/ipv4/netfilter/ip_tables.o.gz failed
modprobe: insmod ip_tables failed
iptables v1.2.5: can't initialize iptables table 'filter' : iptables who? (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.
[root@cd40509-a root]#
Should i upgrade iptables????? i get this mgs when i try iptables -F and iptables -LThanx for ur help!

Matt3333
 
Old 05-25-2003, 01:06 AM   #13
matt3333
Member
 
Registered: Dec 2002
Location: Winnipeg, Manitoba, Canada
Distribution: Slackware
Posts: 371

Original Poster
Rep: Reputation: 30
Hey iceman47 i cant seem to find that part of httpd.conf in mine??
maybe im just missing it or im looking over it i even looked in
commonhttpd.conf and i still cant find it??I have httpd-perl too??
does this make any difference?? Thank-you for ur help

matt3333
 
Old 05-25-2003, 01:13 AM   #14
matt3333
Member
 
Registered: Dec 2002
Location: Winnipeg, Manitoba, Canada
Distribution: Slackware
Posts: 371

Original Poster
Rep: Reputation: 30
I looked in httpd error log to see if i could figure whats wrong and
here it is: Thanx Again

Quote:
[Sat May 17 23:17:05 2003] [alert] httpd: Could not determine the server's fully qualified domain name, using 127.0.0.1 for ServerName [Sat May 17 23:17:05 2003] [notice] Apache-AdvancedExtranetServer/1.3.23 (Mandrake Linux/4mdk) configured -- resuming normal operations [Sat May 17 23:17:05 2003] [notice] Accept mutex: sysvsem (Default: sysvsem) [Sat May 17 23:27:31 2003] [warn] child process 20592 still did not exit, sending a SIGTERM [Sat May 17 23:27:32 2003] [warn] child process 20593 still did not exit, sending a SIGTERM [Sat May 17 23:27:32 2003] [warn] child process 20594 still did not exit, sending a SIGTERM [Sat May 17 23:27:32 2003] [warn] child process 20595 still did not exit, sending a SIGTERM [Sat May 17 23:27:32 2003] [warn] child process 20602 still did not exit, sending a SIGTERM Warning: User directive in <VirtualHost> requires SUEXEC wrapper. Warning: Group directive in <VirtualHost> requires SUEXEC wrapper. [Sat May 17 23:27:52 2003] [alert] httpd: Could not determine the server's fully qualified domain name, using 127.0.0.1 for ServerName [Sat May 17 23:27:52 2003] [notice] Apache-AdvancedExtranetServer/1.3.23 (Mandrake Linux/4mdk) configured -- resuming normal operations [Sat May 17 23:27:52 2003] [notice] Accept mutex: sysvsem (Default: sysvsem) [Sat May 17 23:34:30 2003] [warn] child process 20852 still did not exit, sending a SIGTERM [Sat May 17 23:34:32 2003] [warn] child process 20853 still did not exit, sending a SIGTERM [Sat May 17 23:34:32 2003] [warn] child process 20854 still did not exit, sending a SIGTERM [Sat May 17 23:34:32 2003] [warn] child process 20855 still did not exit, sending a SIGTERM Warning: User directive in <VirtualHost> requires SUEXEC wrapper. Warning: Group directive in <VirtualHost> requires SUEXEC wrapper. [Sat May 17 23:34:38 2003] [alert] httpd: Could not determine the server's fully qualified domain name, using 127.0.0.1 for ServerName [Sat May 17 23:34:38 2003] [notice] Apache-AdvancedExtranetServer/1.3.23 (Mandrake Linux/4mdk) configured -- resuming normal operations [Sat May 17 23:34:38 2003] [notice] Accept mutex: sysvsem (Default: sysvsem) [Sat May 17 23:35:34 2003] [notice] caught SIGTERM, shutting down [Thu May 22 22:43:07 2003] [alert] httpd: Could not determine the server's fully qualified domain name, using 127.0.0.1 for ServerName [Thu May 22 22:43:07 2003] [crit] (98)Address already in use: make_sock: could not bind to port 80 [Thu May 22 22:43:13 2003] [alert] httpd: Could not determine the server's fully qualified domain name, using 127.0.0.1 for ServerName [Thu May 22 22:43:13 2003] [crit] (98)Address already in use: make_sock: could not bind to port 80 [Thu May 22 22:43:20 2003] [alert] httpd: Could not determine the server's fully qualified domain name, using 127.0.0.1 for ServerName [Thu May 22 22:43:20 2003] [crit] (98)Address already in use: make_sock: could not bind to port 80
Thanx

Matt3333
 
Old 05-25-2003, 12:35 PM   #15
matt3333
Member
 
Registered: Dec 2002
Location: Winnipeg, Manitoba, Canada
Distribution: Slackware
Posts: 371

Original Poster
Rep: Reputation: 30
Hey its me again i dont know what i did but i changed something in commonhttpd.conf and now it works THANK-YOU all for ur help but can u answer one more question now that i got http://locahost working how do i make i virtualhost or configure apache before i used webmin but its not working this time i have a DNS from dyndns.org which is Bennettm.kicks-ass.org hehe how would i put this into apache?? and i know my ip addy has to go in there to??? but where??? PLZ help me Thanx

Matt3333
 
  


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 Off
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 08:47 AM
apache http://localhost/mysite ---> http://localhost/mysite/index.php how? ilnli Linux - General 8 06-04-2005 04:23 PM
http://localhost:631 zaicheke Linux - Software 5 08-01-2004 02:13 PM
Apache blank screen at http://localhost/ Steel Shepherd Linux - Software 9 04-10-2004 03:39 AM
Where is http://localhost ????? amp2000 Linux - General 13 11-21-2001 03:43 PM


All times are GMT -5. The time now is 12:30 PM.

Main Menu
Advertisement
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