Reading Time: 5 minutes

In this guide, you will be shown three simple methods to check the version of Apache running on your Linux server. Apache web server is a widely used software that powers many websites. Knowing your Apache version is important for security updates, compatibility, and troubleshooting. By following these methods, you can easily determine your Apache version and stay informed about your web server's software.

What is Apache?

Before delving into the methods of checking Apache versions, it's important to have a basic understanding of what Apache is. Apache is a freely available, open-source web server software runs on numerous operating systems. It was initially released in 1995 and is maintained by the Apache Software Foundation.

Apache acts as an HTTP server, serving webpages and other files over the internet. Its main function is to efficiently handle requests from clients or users and deliver content reliably.

Renowned for its stability, security, and scalability, Apache is a popular selection for peoples, businesses, and other organizations seeking a dependable web server for hosting their websites. It also offers flexibility through a wide range of modules that allow web developers to customize the server's behavior according to their specific requirements. Apache follows a module-based system, enabling developers to add or remove components as needed.

To ensure the best performance and security, it is crucial to keep Apache up to date. Regular updates guarantee that you have the latest security patches and avoid potential issues encountered in previous versions.


How To Check the Version of Apache


Importance of Checking the Apache Version

Checking the Apache version on your server is important for several reasons.

Security Updates

By knowing the Apache version, you can stay informed about any security vulnerabilities that may affect your web server. Regularly updating Apache to the latest version ensures that you have the most up-to-date security patches, protecting your server and websites from potential threats.

Compatibility Requirements

Different versions of Apache may have varying features and configurations. Checking the version helps you ensure compatibility with other software and applications running on your server. It allows you to identify any potential compatibility issues and take appropriate measures to address them.

Troubleshooting

When encountering any issues or errors related to your web server, knowing the Apache version can be beneficial for troubleshooting. Certain problems may be specific to a particular version, and having this information can help you narrow down potential causes and find appropriate solutions more efficiently.

Overall, checking the Apache version is essential for maintaining security, ensuring compatibility, troubleshooting issues, and accessing appropriate documentation and support. It enables you to keep your web server up to date, secure, and optimized for efficient performance.

1. Checking the Apache Version from Terminal

There are multiple ways to check for Apache versions installed on your VPS, Cloud Dedicated Servers, and Dedicated Servers. Below are some of the most popular methods:

The output of the following command will display the current version of Apache installed on your system. Type the following command in your terminal and hit Enter.

httpd -v

This command will print out detailed information about the Apache httpd version installed on your system.

Entering the apachectl -v command is another way to check Apache version as shown below.

apachectl -v

The command will display the Apache version installed on your system, as well as the version of the OpenSSL library currently in use.

In some cases, the Apache version can be found within the Apache configuration file. The configuration file location can vary depending on the Linux distribution and installation method, but it is usually found in the /etc directory. Once inside the configuration file, look for a line with ServerTokens. This line will indicate the current server version and can be changed to expose more or less information.

Furthermore, you can run the RPM command. If your Apache installation was executed via RPM packages, you are able to use this command to determine which Apache version is installed.

rpm -qa httpd

The command above will return the version of Apache installed on your system via RPM package.

If you are using Ubuntu, you can use the below apt-cache command to check Apache version.

apt-cache policy apache2

This command shows information about the Apache HTTP Server version installed as well as available versions in the Ubuntu repository.

2. Checking the Apache Version from WHM

It is also possible to check the Apache version from your Web Host Manager (WHM).

  1. Log in to your WHM.
  2. In the search bar, type Server Status and then click on Apache Status.
  3. You will be able to locate the Apache version next to the Server Version on the Apache Status page.

Alternatively, you can check the Apache version using the EasyApache 4 interface if you have access to it. Follow the next steps in order to check Apache version using the EasyApache 4 interface:

  1. Log in to your WHM.
  2. Navigate to Software and click on EasyApache 4.
  3. Click on Customize profile, and then click on Next Step.
  4. On the Apache MPM step, the Apache version will be displayed at the top of the page.

Depending on your WHM version, you can use Terminal within your WHM to check the current Apache version.

  1. Log in to your WHM.
  2. In the search bar type Terminal.
  3. Open the Terminal and enter http -V command in order to check your Apache version.

3. Checking the Apache Version from cPanel

To check the Apache version from cPanel, you can follow these steps:

  1. Log in to the cPanel account with your credentials.
  2. Once logged in, scroll down or search for the Metrics section.
  3. Within the Metrics section, look for the Server Information or Server Status option and click on it.
  4. On the Server Information or Server Status page, you will find various details about your server, including the Apache version.

Apart from accessing the Apache version through the Server Information or Server Status page in cPanel, there are other ways to check the Apache version.

Here are two additional methods.

3a. Using PHP Version in cPanel

  1. Log in to your cPanel account.
  2. Scroll down or search for the Software section.
  3. Look for the Select PHP Version or PHP Version Manager option and click on it.
  4. On the PHP Version page, you will find the currently selected PHP version along with additional information, including the Apache version that PHP is using. The Apache version should be displayed in the information provided.

3b. Accessing Terminal or SSH Access in cPanel

  1. Log in to your cPanel account.
  2. Scroll down or search for the Advanced section.
  3. Look for the Terminal or SSH Access option and click on it.
  4. A terminal window will open, allowing you to access the command line interface of your server.
  5. Type the following command and press Enter.
httpd -v


The output will display the Apache version installed on your server.

Wrapping Up

Ensuring the security and reliability of your website relies on keeping Apache up to date. Two primary methods for checking the Apache version on your server have been discussed: through the command-line interface (CLI) or the Web Host Manager (WHM).

The CLI method involves utilizing a command-line interface to access your server and issue queries. This approach is suitable for experienced users who are familiar with server management.

Alternatively, the WHM method offers a user-friendly option for checking the Apache version through the Web Host Manager, even for users with limited experience in working with command-line interfaces. Simply access WHM, navigate to Server Status > Apache Status, and you will find the version of Apache installed on your server.

The cPanel method lets you check the Apache version on your server if you are a cPanel user and do not have access to the root level of the server at WHM.

Regardless of your chosen method, regularly checking your Apache version is crucial for safeguarding your website against security risks and reducing potential server issues. By keeping your version updated, you can ensure the optimal performance and protection of your website.

Frequently Asked Questions (FAQ)

Why should I check my Apache version?

What is the easiest way to check Apache version?

How often should I check my Apache version?

Latest Articles

Using a Cloudflare Argo Tunnel with load balancing

Read Article

Subdomain takeover — protect your website against it!

Read Article

Controlling PHP settings with a custom php.ini file

Read Article

Linux dos2unix command syntax — removing hidden Windows characters from files

Read Article

Change cPanel password from WebHost Manager (WHM)

Read Article