How to Check Apache Version

Introduction

Apache is a popular web server used to host websites and applications. It is important to know the version of Apache you are running in order to ensure that your server is up to date and secure. In this tutorial, we will show you how to check the version of Apache you are running on your server. We will also provide some tips on how to upgrade your Apache version if necessary.

How to Check Apache Version

1. Log into your server via SSH.

2. Enter the command: httpd -v

3. The version of Apache running on the server will be displayed.

Introduction

Apache is an open-source web server that supports various operating systems and programming languages. This customizable web server was designed by the Apache Software Foundation as a part of the LAMP stack.

For optimal performance, security, and compatibility with other software, keep the Apache web server up to date and install the latest version on your system.

In this article, you’ll learn how to check the Apache version using several different methods.

How to Check Apache Version

Prerequisites

  • A Linux system (this tutorial uses Ubuntu 22.02 and CentOS 7).
  • A user account with root or sudo privileges.
  • Access to the terminal (for some methods).
  • A cPanel/WHM account (for some methods).
  • Any version of Apache web server installed.

Check the Apache Version via CLI

The easiest way to check the Apache version is via the terminal. Several commands allow users to check the version.

Check Apache Version with httpd

Note: The httpd -v and httpd -V commands work only in CentOS and other RedHat distributions.

Use the Apache httpd command with the -v argument to print the Apache version:

httpd -v
httpd -v terminal output

The output shows the Apache version number, the OS (CentOS), and the server creation time. However, to get a more detailed output, use uppercase -V as the argument.

Run the command with sudo to avoid “Permission denied” errors:

httpd -V
sudo httpd -V terminal output

The output includes information about the Apache version and the operating system, as well as other details such as additional installed modules, libraries, and system architecture.

Check Apache Version with apachectl

Another way to check the Apache server version is with apachectl. The command is compatible with any Linux distribution. Execute the following:

sudo apachectl -V
sudo apachectl -V terminal output

Run the command with -v to print the more concise output:

apahectl v terminal output

Check Apache Version via the Binary File

Another way to check the Apache version is to use the Apache binary file. Run:

/usr/sbin/httpd -v
/usr/sbin/httpd -V terminal output

Execute the argument -V to display a more detailed output:

sudo /usr/sbin/httpd -V
sudo /usr/sbin/httpd -V terminal output

Check Apache Version with apache2

To check the Apache version in Debian-based Linux distributions such as Ubuntu, Debian, and Linux Mint, use the apache2 command.

Print only the Apache version with:

apache -v
apache2 -v terminal output

To get additional info, run:

sudo apache -V
sudo apache2 +V terminal output

Print Apache Package Info to Verify Apache Version

Another way to check the Apache version is to print info about the package manager used to install the web server. The syntax depends on the package manager and the OS, but the general syntax is:

[package_manager_name] info [apache_package_name]

For instance, to check the Apache version installed via apt, run:

apt info apache2
apt info apache2 teminal output

On the other hand, if Apache is installed with the yum package manager, execute

yum info httpd
yum info httpd terminal outout

Note: Learn more about differences between APT and YUM.

Find the Apache Version via WHM (Web Host Manager)

Sysadmins with a WHM/cPanel account can use the WHM platform to check the Apache version. To accomplish this, access the WHM account and:

1. Find the Server Status category on the WHM side menu.

Server status category

2. Click the category name to expand it.

3. Choose the Apache Status feature.

Apache status WHM

4. Look for the Server Version line in the new window.

Apache Status Server Version

Another option is to type apache in the search box above the side menu.

WHM apache typing

The output shows all categories in which Apache is mentioned, including the Server Status category.

Check Apache Version via cPanel

While sysadmins manage Apache configuration via the WHM portal, end-users don’t have those privileges. However, cPanel offers an interface for end-users to check the Apache version running on their hosting account.

To check the Apache version via cPanel, login to your account and follow these steps:

1. Locate the General information section.

2. Click the Server Information category.

Apache cPanel General Information Server Information

The image shows the Apache version that runs on the server. 

Apache version in cPanel

Conclusion

After reading this article, you know how to check the Apache version.

Next, learn how to start, stop, or restart the Apache web server.

How to Check Apache Version

Apache is a popular open-source web server used to host websites and applications. It is important to keep your Apache version up to date to ensure that your website or application is running on the most secure and stable version. In this article, we will show you how to check the version of Apache you are running.

Check Apache Version on Linux

If you are running Apache on a Linux server, you can use the following command to check the version of Apache you are running:

$ httpd -v

This will output the version of Apache you are running. For example, if you are running Apache 2.4.37, the output will look like this:

Server version: Apache/2.4.37 (Unix)

Check Apache Version on Windows

If you are running Apache on a Windows server, you can use the following command to check the version of Apache you are running:

C:\> httpd -v

This will output the version of Apache you are running. For example, if you are running Apache 2.4.37, the output will look like this:

Server version: Apache/2.4.37 (Win32)

Conclusion

In this article, we showed you how to check the version of Apache you are running. We showed you how to do this on both Linux and Windows servers. Keeping your Apache version up to date is important for security and stability, so make sure to check your version regularly.

Jaspreet Singh Ghuman

Jaspreet Singh Ghuman

Jassweb.com/

Passionate Professional Blogger, Freelancer, WordPress Enthusiast, Digital Marketer, Web Developer, Server Operator, Networking Expert. Empowering online presence with diverse skills.

jassweb logo

Jassweb always keeps its services up-to-date with the latest trends in the market, providing its customers all over the world with high-end and easily extensible internet, intranet, and extranet products.

Contact
San Vito Al Tagliamento 33078
Pordenone Italy
Item added to cart.
0 items - 0.00
Open chat
Scan the code
Hello 👋
Can we help you?