HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (
-   General (
-   -   Apache not working on localhost (

akaiser 1st June 2007 19:11

Apache not working on localhost

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:


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 16:02

What's the output of

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

akaiser 4th June 2007 10:39

The output of httpd -t is


Syntax OK

falko 5th June 2007 20:10

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

netstat -tap

akaiser 5th June 2007 20:29

netstat shows


tcp        0      0 *:*                    LISTEN    32034/apache
The hostname is

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


tcp 0 0 *:* 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 Because your Apache is not listening on, ISPConfig thinks that it's offline.

akaiser 6th June 2007 18:36


I have corrected the httpd.conf file to:


Listen xx.xx.xx.xx:80

and all is working now!

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


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

falko 7th June 2007 16:57

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

gg.heato 19th September 2009 08: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

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 11:59

please post the output of:

httpd -t


netstat -tap | grep http

All times are GMT +2. The time now is 00:48.

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