[RESOLVED] Unable to start httpd
Results 1 to 4 of 4

Thread: [RESOLVED] Unable to start httpd

  1. #1
    Senior Member Derokorian's Avatar
    Join Date
    Apr 2011
    Location
    Denver
    Posts
    2,261

    resolved [RESOLVED] Unable to start httpd

    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:

    Code:
    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?):
    Code:
    #!/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!
    Sadly, nobody codes for anyone on this forum. People taste your dishes and tell you what is missing, but they don't cook for you. ~anoopmail
    I'd rather be a comma, then a full stop.
    User Authentication in PHP with MySQLi - Don't forget to mark threads resolved - MySQL(i) warning

  2. #2
    Senior Member Derokorian's Avatar
    Join Date
    Apr 2011
    Location
    Denver
    Posts
    2,261
    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...
    Sadly, nobody codes for anyone on this forum. People taste your dishes and tell you what is missing, but they don't cook for you. ~anoopmail
    I'd rather be a comma, then a full stop.
    User Authentication in PHP with MySQLi - Don't forget to mark threads resolved - MySQL(i) warning

  3. #3
    Settled 4 red convertible dalecosp's Avatar
    Join Date
    Jul 2002
    Location
    Accelerating Windows at 9.81 m/s....
    Posts
    8,476
    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 http://freebsd-image-gallery.netcode...mon_hammer.png

    I find it pretty useful, especially calling it with "configtest" before start/graceful.
    Last edited by dalecosp; 09-29-2016 at 11:32 PM.
    /!!\ mysql_ is deprecated --- don't use it! Tell your hosting company you will switch if they don't upgrade! /!!!\ ereg() is deprecated --- don't use it!

    dalecosp "God doesn't play dice." --- Einstein "Perl is hardly a paragon of beautiful syntax." --- Weedpacket

    Getting Help at All --- Collected Solutions to Common Problems --- Debugging 101 --- Unanswered Posts --- OMBE: Office Machines, Business Equipment

  4. #4
    Senior Member Derokorian's Avatar
    Join Date
    Apr 2011
    Location
    Denver
    Posts
    2,261
    Quote Originally Posted by dalecosp View Post
    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.
    Sadly, nobody codes for anyone on this forum. People taste your dishes and tell you what is missing, but they don't cook for you. ~anoopmail
    I'd rather be a comma, then a full stop.
    User Authentication in PHP with MySQLi - Don't forget to mark threads resolved - MySQL(i) warning

Thread Information

Users Browsing this Thread

There are currently 2 users browsing this thread. (0 members and 2 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •