Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.


I've recently compiled MapServer 6.2 on a CentOS 6.3 machine, using

./configure --with-ogr=/usr/bin/gdal-config --with-gdal=/usr/bin/gdal-config --with-proj=/usr --with-geos=/usr/bin/geos-config --with-postgis=/usr/bin/pg_config --with-php=/usr/include/php --with-wfs --with-wfsclient --with-wmsclient --enable-debug --with-threads --with-wcs --with-sos --with-gd --with-freetype=/usr/bin --with-jpeg --with-cairo --with-curl

if that is of interest, anyway.

So after that, Apache/2.2.15 silently fails to restart, i.e. when apachectl graceful, it says "httpd not running, trying to start". There is nothing of interest in the Apache errors_log, /var/log/messages, and it is weird because so far it has always worked.

Restarting the machine multiple times did not solve the problem. Some other stuff I did:

[root@R12X0210 cgi-bin]# service httpd status
httpd is stopped
[root@R12X0210 cgi-bin]# ps aux|grep httpd
root      1846  0.0  0.0 103236   864 pts/0    S+   12:11   0:00 grep httpd

I suspect this might have something to do with a php module that was altered/added by MapServer, but I don't really know... I don't even know how to properly debug this.

EDIT: Alright, /var/log/httpd/error_log is not necessarily empty, it rather shows those two things after doing /sbin/service/httpd start

[Wed Dec 19 17:33:24 2012] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Wed Dec 19 17:33:24 2012] [error] Server should be SSL-aware but has no certificate configured [Hint: SSLCertificateFile] ((null):0)

Does the SSL error result in the termination of the start mechanism? The thing is we have a unsigned certificate running, i.e. we're testing https Access but not yet in production mode. Absolutely nothing has been changed in the SSL configuration of Apache before it stopped working.

EDIT2: In the meantime, I reinstalled httpd with yum reinstall httpd, this did not solve the problem, either.

share|improve this question
What is in your apache error log file? –  Jordi Kroon Dec 19 '12 at 11:16
See my edit above. I still think this is not directly related to the problem. –  wnstnsmth Dec 19 '12 at 14:42
If SSL layer can not be started, apache will not start. Level error in the apache error_log should not be ignored ever. –  Mircea Vutcovici Dec 19 '12 at 15:46
Fine, when commenting out all of the SSL related stuff, Apache starts. But as I said, ABSOLUTELY NOTHING has been changed in httpd.conf, but all of a sudden it stopped working. Apache never had an SSLCertificateFile configured, but still the server started without problems. Just until some days ago, when I installed MapServer. –  wnstnsmth Dec 20 '12 at 7:12

1 Answer 1

If PostgreSQL is running on the same machine make sure it is listening on or on, or on :: on port 5432. To check this, the following command should return something:

sudo netstat -tlnp|egrep ':5432'

If you have PostgreSQL running on a different machine, check that the hosts file is configured correctly and that the proper host is used in the PostgreSQL configuration of your PHP application

share|improve this answer
This doesn't return anything. PG runs on the same machine, but has been correctly configured to listen where it should listen. Just, from one moment to the other, this is not set anymore. How can this happen? –  wnstnsmth Dec 20 '12 at 5:13
I've added the stuff that's in pg_hba.conf - to me it looks ok. Where else could I change settings? –  wnstnsmth Dec 20 '12 at 5:21
Could you please provide the output of sudo netstat -tlnp. I think that PostgreSQL is not started, or it is not listening on the right socket (IP:port). –  Mircea Vutcovici Dec 20 '12 at 6:58
You were right, postgres was not started. I forgot that in CentOS, obviously, everything needs to be started manually (including Apache and Postgres). I edited my whole question since PostgreSQL is actually not part of the problem, this question should be only about Apache. –  wnstnsmth Dec 20 '12 at 7:09
Can you post the apache configuration? Remove all comments and edit/hide/remove sensitive information like passwords. –  Mircea Vutcovici Dec 20 '12 at 7:22

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.