To find the version of Apache HTTP Server that you are running, you can use the httpd
command with the -v
flag. This will display the version of Apache HTTP Server, along with other information such as the build date and compiler used.
For example:
$ httpd -v Server version: Apache/2.4.41 (Ubuntu) Server built: 2020-07-14T12:07:24
Alternatively, you can also use the apachectl
command with the -v
flag to display the version of Apache HTTP Server. This command is a wrapper around the httpd
command, and it provides a number of additional options and features for controlling the Apache HTTP Server.
For example:
$ apachectl -v Server version: Apache/2.4.41 (Ubuntu) Server built: 2020-07-14T12:07:24
Note that these commands will only work if Apache HTTP Server is installed and running on your system. If Apache is not installed or not running, these commands will not be able to display the version.
It's also important to note that these commands will only display the version of Apache HTTP Server itself, and not the version of any other software or components that may be installed or used with Apache (such as PHP or MySQL).