HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   General (http://www.howtoforge.com/forums/forumdisplay.php?f=15)
-   -   Apache not working on localhost (http://www.howtoforge.com/forums/showthread.php?t=13108)

akaiser 1st June 2007 18:11

Apache not working on localhost
 
Hello,

I've noticed in ISPCONFIG that Apache was not working, but all the hosted websites are accesible... Strange.

I've checked apache with "apachectl status" and get following:

Code:

Looking up localhost
Making HTTP connection to localhost
Alert!: Unable to connect to remote host.

lynx: Can't access startfile http://localhost/server-status

I've tried to telnet to port 80 and get an error (port 21, 81, etc have no problem).

Any idea?

falko 2nd June 2007 15:02

What's the output of
Code:

httpd -t
? Any errors in Apache's error log?

akaiser 4th June 2007 09:39

The output of httpd -t is

Code:

Syntax OK

falko 5th June 2007 19:10

Ok, any errors in Apache's error log?
What's he output of
Code:

netstat -tap
?

akaiser 5th June 2007 19:29

netstat shows

Code:

tcp        0      0 server1.xxx:www *:*                    LISTEN    32034/apache
The hostname is server1.xxx.com

I've checked the apache error log, but there aren't errors related with this (just some "File does not exist: /var/www/sharedip/search.php", etc)

I've also checked apache config (httpd.conf), dind't found nothing strange (for example "ServerName localhost")

If it helps Apache is version 1.3.33 using ispconfig 2.2.13.

falko 6th June 2007 17:18

Quote:

tcp 0 0 server1.xxx:www *:* LISTEN 32034/apache
Apache is listening on a specific IP address only, not on all IP addresses. ISPConfig probes the Apache on the IP address 127.0.0.1. Because your Apache is not listening on 127.0.0.1, ISPConfig thinks that it's offline.

akaiser 6th June 2007 17:36

Thanks...

I have corrected the httpd.conf file to:

Code:

Listen xx.xx.xx.xx:80
Listen 127.0.0.1:80

and all is working now!

Would it be better (more secure) to change it to

Code:

Listen 80
I have a server with various IP, and have some IP only configured for mail, dns, etc

falko 7th June 2007 15:57

Both solutions are ok. With the latter Apache will listen on all IP addresses.

gg.heato 19th September 2009 07:10

to original thread opener:im not hijacking your thread. i just have a similar problem and hate to open a new thread for the same thing.


i have the same problem. im not exactly a noob at linux but i am at linux servers and stuff.

httpd fails to start ive already set it to listen correctly and still nothing
the only way i can get it to start is with
Code:

httpd -e DEBUG
which doesnt give any errors or anything. after that it works percfectly. though i think i shouldnt be running it like that what should i do about it?

till 19th September 2009 10:59

please post the output of:

httpd -t

and

netstat -tap | grep http


All times are GMT +2. The time now is 04:09.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.