Running Version of httpd loaded on memory when it needs to be replaced by new installed one

EneTar

Well-Known Member
Dec 19, 2015
156
12
18
Greece
cPanel Access Level
Root Administrator
Command:
Code:
/usr/bin/needs-restarting
3343770 : /usr/sbin/httpd -k start

httpd -v
Server version: Apache/2.4.41 (cPanel)
Server built:   Dec 25 2019 10:27:21
Security advisor confirms that httpd needs to be restarted.

Environment Information
Code:
grep '' /etc/redhat-release /usr/local/cpanel/version /var/cpanel/envtype ; grep CPANEL= /etc/cpupdate.conf ; httpd -v ; php -v ; mysql -V
/etc/redhat-release:CloudLinux release 7.7 (Valery Bykovsky)
/usr/local/cpanel/version:11.84.0.21
/var/cpanel/envtype:standard
CPANEL=release
Server version: Apache/2.4.41 (cPanel)
Server built:   Dec 25 2019 10:27:21
PHP 7.3.13 (cli) (built: Dec 24 2019 15:12:30) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.13, Copyright (c) 1998-2018 Zend Technologies
    with Zend OPcache v7.3.13, Copyright (c) 1999-2018, by Zend Technologies
mysql  Ver 15.1 Distrib 10.2.31-MariaDB, for Linux (x86_64) using readline 5.1
I'm not sure if httpd -v returns the running apache version loaded in memory or the latest installed
How can I find which version is already running before restarting httpd? If indeed the above command returns the one loaded in memory how can I check which version is going to run upon restart?
 

ffeingol

Well-Known Member
PartnerNOC
Nov 9, 2001
422
96
328
cPanel Access Level
DataCenter Provider
http -v is going to give you the installed version. Your literally running the binary and asking it to tell you it's version. You can check the version of the running Apache from Apache Status in WHM. Normal cPanel upcp should be updating Apache.
 

EneTar

Well-Known Member
Dec 19, 2015
156
12
18
Greece
cPanel Access Level
Root Administrator
Apache Status in WHM reports:
Code:
Server Version: Apache/2.4.41 (cPanel) OpenSSL/1.0.2t mod_bwlimited/1.4
Server MPM: worker
Server Built: Dec 25 2019 10:27:21
which is the same with httpd -v
 

cPanelLauren

Product Owner
Staff member
Nov 14, 2017
13,304
1,252
313
Houston
All going to Apache status in WHM does is load the details of
Code:
apachectl status
Which gives you the version of apache that is currently running. When a new version of Apache is installed a restart of the service is queued, if you're receiving that notice it's either that the restart didn't take place correctly or just hadn't yet. You're currently running the most current version of apache.