LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   http://localhost apache (https://www.linuxquestions.org/questions/linux-software-2/http-localhost-apache-61452/)

matt3333 05-23-2003 06:43 PM

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

iceman47 05-23-2003 07:05 PM

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
:)

matt3333 05-23-2003 07:55 PM

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

iceman47 05-23-2003 08:01 PM

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!

matt3333 05-23-2003 10:27 PM

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

MasterC 05-24-2003 01:06 AM

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

iceman47 05-24-2003 05:04 AM

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

matt3333 05-24-2003 02:03 PM

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

david_ross 05-24-2003 02:13 PM

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/

matt3333 05-24-2003 02:34 PM

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

david_ross 05-24-2003 02:42 PM

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

You can restore the default rules by resrting iptables.

matt3333 05-24-2003 06:26 PM

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

matt3333 05-25-2003 12:06 AM

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

matt3333 05-25-2003 12:13 AM

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

matt3333 05-25-2003 11:35 AM

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


All times are GMT -5. The time now is 11:53 AM.