In this companion beginner guide, we will be showing you how to find the Apache version on CentOS, Fedora, and related RHEL-based Linux systems using the command line tools.
We wrote a comprehensive guide on how to check the Apache version on Ubuntu Linux systems so if that is what you are interested in you may visit that article. If not you may proceed. Windows users please follow this guide as things are significantly different on that platform.
Like in other Linux flavors you do not need root privileges to use this command therefore we will not be using sudo in our examples.
This article also assumes that you know how to access your CentOS terminal and that you have Apache installed.
Use This Command to Find Apache Version on CentOS
The most basic result can be gotten by running the Apache server daemon using the -v
option in lower case as shown here.
$ httpd -v
The expected result will look something similar to this.
Server version: Apache/2.4.51
Server built: Oct 07 2021 19:17:14
For additional information, you can use the same Apache server daemon using the -V
option in an upper case like this.
$ httpd -V
With an output that looks something like this.
Server version: Apache/2.4.51
Server built: Oct 07 2021 19:17:14
Server's Module Magic Number: 20051115:3
Server loaded: APR 1.7.0, APR-Util 1.6.1
Compiled using: APR 1.7.0, APR-Util 1.6.1
Architecture: 64-bit
Server MPM: event
threaded: yes (fixed thread count)
forked: yes (variable process count)
Server compiled with....
-D APACHE_MPM_DIR="server/mpm/prefork"
-D APR_HAS_SENDFILE
-D APR_HAS_MMAP
-D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
-D APR_USE_SYSVSEM_SERIALIZE
-D APR_USE_PTHREAD_SERIALIZE
-D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
-D APR_HAS_OTHER_CHILD
-D AP_HAVE_RELIABLE_PIPED_LOGS
-D DYNAMIC_MODULE_LIMIT=128
-D HTTPD_ROOT="/etc/httpd"
-D SUEXEC_BIN="/usr/sbin/suexec"
-D DEFAULT_PIDLOG="logs/httpd.pid"
-D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
-D DEFAULT_LOCKFILE="logs/accept.lock"
-D DEFAULT_ERRORLOG="logs/error_log"
-D AP_TYPES_CONFIG_FILE="conf/mime.types"
-D SERVER_CONFIG_FILE="conf/httpd.conf"
In Closing
If you are running Apache on Windows we have prepared this guide for your convenience. Meanwhile, those on Ubuntu or Debian-based systems can follow this guide as well.
As always you can get help with using the httpd
daemon with the -h
option like so
$ httpd -h
That should be enough to allow you to find the Apache version on CentOS, Fedora, and related RHEL-based Linux systems using the command line tools.
Found this article interesting? Follow Brightwhiz on Facebook, Twitter, and YouTube to read and watch more content we post.