Hey guys,

I'm having an issue on a newly built machine running CentOS Linux release 7.2.1511 (Core) and having issues running httpd. I build by hand, using the following:

wget http://psg.mtu.edu/pub/apache//httpd/httpd-${APACHE_VER}.tar.gz
gunzip http-${APACHE_VER}.tar.gz
tar -xf http-${APACHE_VER}.tar
rm http-${APACHE_VER}.tar
# install apache
pushd /source/http-${APACHE_VER}
./configure --enable-rewrite --enable-so
make
make install
sed -e s,replace.*interpreter,usr/bin/perl, /usr/local/apache2/bin/apxs -i
popd

I'm using the follow init.d script (which is also rc.d?):

#!/bin/sh
#
# Startup script for the Apache Web Server
#
# chkconfig: 345 85 15
# description: Apache is a World Wide Web server.  It is used to serve \
#           HTML files and CGI.
# processname: httpd
# pidfile: /usr/local/apache2/logs/httpd.pid
# config: /usr/local/apache2/conf/httpd.conf

# Source function library.
. /etc/rc.d/init.d/functions

# See how we were called.
case "$1" in
start)
echo -n "Starting httpd: "
daemon /usr/local/apache2/bin/httpd -DSSL
echo
touch /var/lock/subsys/httpd
;;
stop)
echo -n "Shutting down http: "
killproc httpd
echo
rm -f /var/lock/subsys/httpd
rm -f /usr/local/apache2/logs/httpd.pid
;;
status)
status httpd
;;
restart)
$0 stop
$0 start
;;
reload)
echo -n "Reloading httpd: "
killproc httpd -HUP
echo
;;
*)
echo "Usage: $0 {start|stop|restart|reload|status}"
exit 1
esac

exit 0

On other servers, I've built exectly the same way and used the same init.d script and its working just fine, but those systems are running CentOS release 6.5 (Final). I'm having a very hard time debugging this, the only thing I can find seems to be:

systemctl status httpd

● httpd.service - SYSV: Apache is a World Wide Web server.  It is used to serve            HTML files and CGI.
Loaded: loaded (/etc/rc.d/init.d/httpd)
Active: failed (Result: exit-code) since Thu 2016-09-29 17:55:35 UTC; 3h 4min ago
Docs: man:systemd-sysv-generator(8)
Process: 5819 ExecStart=/etc/rc.d/init.d/httpd start (code=exited, status=203/EXEC)

Sep 29 17:55:35 ip-172-16-51-51.us-west-2.compute.internal systemd[1]: Starting SYSV: Apache is a World Wide Web server.  It is used to serve    &...CGI....
Sep 29 17:55:35 ip-172-16-51-51.us-west-2.compute.internal systemd[1]: httpd.service: control process exited, code=exited status=203
Sep 29 17:55:35 ip-172-16-51-51.us-west-2.compute.internal systemd[1]: Failed to start SYSV: Apache is a World Wide Web server.  It is used to serve  &...d CGI..
Sep 29 17:55:35 ip-172-16-51-51.us-west-2.compute.internal systemd[1]: Unit httpd.service entered failed state.
Sep 29 17:55:35 ip-172-16-51-51.us-west-2.compute.internal systemd[1]: httpd.service failed.
Hint: Some lines were ellipsized, use -l to show in full.

Anyone have any ideas on this? Thanks!

    Hmm I'm not entirely sure how, but I rebuilt php and now its working... makes total sense right? HAHA

    I guess its possible its one of the other 2 dozen things I've tried as well...

      So, installing from tarball you don't get "apachectl"?

      On our CentOS systems it's under /usr/local/apache/bin/. Of course, that was originally set up before I even got this job years ago. I don't play with Linux much unless work demands it, as you might already know

      I find it pretty useful, especially calling it with "configtest" before start/graceful.

        dalecosp;11057689 wrote:

        So, installing from tarball you don't get "apachectl"?

        yes of course I do, but that wasn't working in exactly the same way. But I always want to be able to use systemctl whenever possible.

          Write a Reply...