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 |
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 :) |
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 |
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! |
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 |
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 |
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 |
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 |
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/ |
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 |
You mention firewall rules. Have you tried temporarily flushing them:
iptables -F You can restore the default rules by resrting iptables. |
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 |
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 |
I looked in httpd error log to see if i could figure whats wrong and
here it is: Thanx Again Quote:
Matt3333 |
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. |