15%

Alexhost grants you wishes

Take the survey and win prizes

ALEX26
Get Started
25.12.2024

How to Check Apache Version in a VPS

The Apache HTTP Server, commonly referred to as Apache, is one of the most widely used web server software solutions in the world. Knowing the exact Apache version installed on your Virtual Private Server (VPS) is essential for maintaining security, compatibility, and performance.

This guide explains several reliable methods to check the Apache version on both Linux and Windows VPS environments.

Why Checking the Apache Version Is Important

  1. Security: Different Apache versions may contain known vulnerabilities that are fixed in newer releases. Knowing your version helps ensure your server is secure.
  2. Compatibility: Some applications and modules require specific Apache versions to function correctly.
  3. Performance: Newer Apache versions often include performance improvements and bug fixes.

Method 1: Check Apache Version Using the Command Line

The fastest and most accurate way to check the Apache version is through the command line.

On Linux VPS

  1. Connect to your server using SSH.
  2. Run the following command:

apache2 -v

On some distributions, you may need to use:

httpd -v

The output will look similar to this:


Server version: Apache/2.4.41 (Ubuntu)
Server built: 2021-03-11T18:58:20

The version number (for example,

2.4.41
) is the Apache version currently installed.

On Windows VPS

  1. Open Command Prompt by pressing Win + R, typing
    cmd
    , and pressing Enter.
  2. Navigate to the Apache installation directory, for example:

cd C:\Program Files\Apache Group\Apache2\bin

  1. Run the following command:

httpd -v

This command will display the Apache version installed on your Windows VPS.

Method 2: Check Apache Version via Web Control Panel

If your server uses a web-based control panel such as cPanel or Plesk, you can usually find the Apache version in the dashboard.

  1. Log in to your hosting control panel.
  2. Navigate to sections like Server Information, Server Status, or System Information.
  3. Locate the Apache version listed among server details.

Method 3: Check Apache Configuration Files

You can also inspect Apache configuration files, although this method is less direct.

  1. Open the main Apache configuration file:
  • Red Hat-based systems:
    /etc/httpd/conf/httpd.conf
  • Debian-based systems:
    /etc/apache2/apache2.conf
  1. Look for comments or module references that indicate version compatibility.

While the version may not always be explicitly stated, related configuration comments can provide useful clues.

Method 4: Access the Apache Server Status Page

If the Apache server status module is enabled, you can view detailed server information through a web interface.

Enable mod_status

Add the following configuration to your Apache setup:


<Location "/server-status">
  SetHandler server-status
  Require host your-ip-address
</Location>

Restart Apache:

sudo systemctl restart apache2

Then open the following URL in your browser:

http://your-server-ip/server-status

The server status page displays various details, including the Apache version.

Conclusion

Checking the Apache version on your VPS is a simple but critical task that can be performed using the command line, control panels, configuration files, or the server status page.

Keeping track of your Apache version helps maintain server security, ensure application compatibility, and optimize performance. Regularly updating Apache to the latest stable release is recommended to protect your server and ensure long-term reliability.

15%

Alexhost grants you wishes

Take the survey and win prizes

ALEX26
Get Started