The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

PRM/SIM: -DSSL switch will not be added when starting apache using a script.

Discussion in 'EasyApache' started by nat, Nov 15, 2004.

  1. nat

    nat Well-Known Member

    Joined:
    Jan 16, 2003
    Messages:
    204
    Likes Received:
    0
    Trophy Points:
    16
    Problem:
    Whenever apache is restarted through a script, the "-DSSL" will not be added at the end.

    Normal:
    /usr/local/apache/bin/httpd -DSSL

    After starting it up through a script:
    /usr/local/apache/bin/httpd


    1. PRM kills apache due to it exceeding limits. That is fine. SIM restarts it.

    I must manually through shell do the following:
    /sbin/service httpd stop
    /sbin/service httpd start


    2. So I added in this in the sim http script:
    /sbin/service httpd stop
    /sbin/service httpd start


    3. I killed the process and waited for sim to restart it. When it started up, the -DSSL was not running.

    /usr/local/apache/bin/httpd


    Whenever apache is restarted through a script, the "-DSSL" will not be added at the end.

    It use to work fine until running /scripts/easyapche several weeks ago to fix security alert.




    ps: I also tried...
    /sbin/service httpd stop
    /sbin/service httpd startssl
     
  2. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    service httpd stop
    service httpd stop
    service httpd startssl


    Should indeed work just fine. I'd recommend doing a couple of stops to make sure that it dies.

    Alternatively, you could do what cPanel does by checking chkservd:

    cat /etc/chkserv.d/apache
     
  3. nat

    nat Well-Known Member

    Joined:
    Jan 16, 2003
    Messages:
    204
    Likes Received:
    0
    Trophy Points:
    16

    Yes. Thanks!

    What cpanel does works in sim's http.chk script. Issue solved. No more https downtime.
     
  4. shiv

    shiv Member

    Joined:
    Jul 26, 2004
    Messages:
    16
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Bangalore
    Use this to Monitor https usign chkservd

    Hi,

    Wanna monitor https via WHM using chkservd? Here I give you very simple configuration.

    chkservd maintains configuration files for each services at /etc/chkserv.d/

    Create a new file called https and add the following content in it.

    ----------

    service[https]=443,GET / HTTP/2.0;killall -TERM httpd;sleep 2;killall -9 httpd;/etc/rc.d/init.d/httpd stop;/etc/rc.d/init.d/httpd startssl;/usr/local/apache/bin/apachectl startssl

    ----------

    Then edit /etc/chkserv.d/chkservd.conf
    and enable https in it as follows.

    ----------
    https=1
    ----------

    Once you create the https file you can directly goto whm "Service Manager" link and enable https monitoring. You will be able to see https listed in "Service Status"

    Then go ahead and restart chkservd

    You find the following log in chkservd.log

    Service check ....antirelayd [+]...apache [+]...cpsrvd [+]...entropychat [+]...exim [+]...eximstats [+]...ftpd [+]...httpd [+]...https [+]...imap [+]...melange [+]...mysql [+]...named [+]...pop [+]...spamd [+]...syslogd [+]...Done

    Or Once again visit "Service Status" section in WHM.

    ChkServd Rocks with Green Light for HTTPS


    --
    --
    "Wisdom is knowing what to do next, skill is knowing how to do it, and virtue is doing it."
    --
    With Best Regards,
    Omshivaprakash.H.L

    Technical Manager
    Carmatec IT Solutions Pvt. Ltd.
    CARMATEC & INSTA CARMA Solution is the only option....
     
Loading...

Share This Page