How to Check Apache Web Server Version in Linux

How to Check Apache Web Server Version in Linux

There are one or two commands to check the Apache web server version in Linux, depending on the Linux distribution you use. The apachectl command, which available in both Debian and RedHat based Linux distributions have -v option which prints the Apache version:

apachectl -v

The command displays the version number, build date and time, and Linux version.

check apache version

In CentOS and Fedora Linux, to check the apache version, type the following on the command line.

httpd -v

You should see something similar to the following output (version number and build date could be different).

how to check apache version in linux

Ubuntu and other Debian based Linux distributions have apache2 command. You can check your version in Ubuntu with the following command:

apache2 -v
Server version: Apache/2.4.41 (Ubuntu)
Server built:   2020-08-12T19:46:17