Sep 27, 2023 5 min read

How to Check Apache Version

Check Apache Version with our step-by-step tutorial. The open-source web server Apache is supported by multiple OS and programming languages.

Check Apache Version
Table of Contents


Before we begin talking about how to check Apache version, let's briefly understand – What is an Apache?

Many operating systems and programming languages are supported by the open-source web server Apache. The Apache Software Foundation created this versatile web server as a component of the LAMP stack.

Install the most recent version of Apache on your system to ensure optimum performance, security, and compatibility with other software.

In this tutorial, you will check Apache version. We will also address a few FAQs on how to check Apache version.


  • A Linux system (in this tutorial, we are using Ubuntu 22.02 and CentOS 7).
  • A user account with root or sudo privileges.
  • For some methods, access to the terminal is necessary.
  • Installed Apache web server (any version).

Check the Apache Version via CLI

Using the terminal is the simplest approach to determining the version of Apache. Users can check the version with a number of commands.

Check Apache Version with httpd

Note: Only RedHat distributions such as CentOS and others support the httpd -v and httpd -V commands.

To print the Apache version, use the -v argument with the Apache httpd command:

httpd -v

The output displays the OS (CentOS), the Apache version, and the server's creation time. Nevertheless, use uppercase -V as the argument to get a more thorough output.

In order to avoid "Permission denied" errors, run the command using sudo:

httpd -V

The output contains details on the operating system and Apache version in addition to other information like other installed modules, libraries, and system architecture.

Check Apache Version with apachectl

Using apachectl is another approach to determine the version of the Apache server. Every Linux distribution is compatible with the command. Do the following actions:

sudo apachectl -V

To print the shorter output, run the command with -v:

Check Apache Version via the Binary File

Using the Apache binary file is another approach to determine the version of Apache. Run:

/usr/sbin/httpd -v

Use the -V argument to see a more comprehensive output:

sudo /usr/sbin/httpd -V

Check Apache Version with apache2

Use the apache2 command to determine the Apache version in Linux distributions based on Debian, including Ubuntu, Debian, and Linux Mint:

Print only the Apache version while using:

apache2 -v

Use the following command to obtain more information:

sudo apache2 -V

Printing information about the package manager used to install the web server is another approach to check the Apache version. The syntax varies depending on the OS and the package manager, but in general it is as follows:

[package_manager_name] info [apache_package_name]

Use the following command, for instance, to verify the Apache version installed by apt:

apt info apache2

Conversely, if Apache was set up using the yum package manager, run:

yum info httpd
Note: Find out more about the distinctions between APT and YUM.

Find the Apache Version via WHM (Web Host Manager)

The WHM platform can be used by sysadmins with a WHM/cPanel account to check the version of Apache. To do this, log in to your WHM account and:

1) On the WHM side menu, locate the Server Status category.

2) To expand a category, click on its name.

3) Select the Apache Status feature.

4) In the new window, look for the Server Version line.

Furthermore, you can enter apache in the search field above the side menu.

The output includes the Server Status category as well as all other categories where Apache is mentioned.

Check Apache Version via cPanel

End users don't have access to the WHM portal, where sysadmins can manage Apache configuration. For end users to check the Apache version active on their hosting account, cPanel includes an interface.

Go onto your account and take the following actions to check the Apache version through cPanel:

1) Find the General information section.

2) Choose the Server Information category.

The image displays the server's installed version of Apache.

FAQs to Check Apache Version

What's the difference between Apache HTTP Server and Apache Tomcat?

Apache HTTP Server (commonly known as Apache) is a web server application, while Apache Tomcat is a web server and servlet container. The former primarily handles serving static content, while the latter provides support for Java-based web applications.

What does the Apache version number consist of?

The Apache version number consists of two parts: the major version number, which indicates significant updates and changes, and the minor version number, which represents bug fixes and minor updates.

Can I check the Apache version from a web browser?

No, you cannot check the Apache version directly from a web browser. It can only be checked through command-line tools or by accessing server files and configurations.

How do I check the Apache version on macOS?

On macOS, you can open a terminal window and run the command httpd -v to check the Apache version.

What's the command to check the Apache version on Linux?

To check the Apache version on Linux, you can run the command apache2 -v or httpd -v, depending on your distribution.

Does the Apache version affect website compatibility?

In some cases, website compatibility can be affected by the Apache version. It's recommended to test your website on different Apache versions to ensure compatibility.

Are there any security concerns related to older Apache versions?

Yes, older Apache versions may have security vulnerabilities that have been patched in newer releases. It's crucial to keep your Apache version up to date to ensure the security of your server.


You now know how to verify the Apache version after going through this tutorial. If you have any suggestions or queries, kindly leave them in the comments section.

Great! You’ve successfully signed up.
Welcome back! You've successfully signed in.
You've successfully subscribed to DevOps Tutorials - VegaStack.
Your link has expired.
Success! Check your email for magic link to sign-in.
Success! Your billing info has been updated.
Your billing was not updated.