The method

Connect to port 80 on the host and send it

HEAD / HTTP/1.0

This needs to be followed by carriage-return + line-feed twice

You'll get back something like this

HTTP/1.1 200 OK
Date: Fri, 03 Oct 2008 12:39:43 GMT
Server: Apache/2.2.9 (Ubuntu) DAV/2 SVN/1.5.0 PHP/5.2.6-1ubuntu4 with Suhosin-Patch mod_perl/2.0.4 Perl/v5.10.0
Last-Modified: Thu, 02 Aug 2007 20:50:09 GMT
ETag: "438118-197-436bd96872240"
Accept-Ranges: bytes
Content-Length: 407
Connection: close
Content-Type: text/html; charset=UTF-8

You can then extract the apache version from the Server: header

Typical tools you can use

You could use the HEAD utility which comes with a full install of Perl's LWP library, e.g.

HEAD http://your.webserver.com/

Or, use the curl utility, e.g.

 curl --head http://your.webserver.com/

You could also use a browser extension which lets you view server headers, such as Live HTTP Headers or Firebug for Firefox, or Fiddler for IE

Stuck with Windows?

Finally. if you're on Windows, and have nothing else at your disposal, open a command prompt (Start Menu->Run, type "cmd" and press return), and then type this

telnet your.webserver.com 80

Then type (carefully, your characters won't be echoed back)

HEAD / HTTP/1.0

Press return twice and you'll see the server headers.

Other methods

As mentioned by cfeduke and Veynom, the server may be set to return limited information in the Server: header. Try and upload a PHP script to your host with this in it

<?php phpinfo() ?>

Request the page with a web browser and you should see the Apache version reported there.

You could also try and use PHPShell to have a poke around, try a command like

/usr/sbin/apache2 -V
🌐
Liquid Web
liquidweb.com › home › 3 methods of checking apache version
3 Methods of Checking Apache Version | Liquid Web
November 19, 2024 - 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.
Top answer
1 of 11
145

The method

Connect to port 80 on the host and send it

HEAD / HTTP/1.0

This needs to be followed by carriage-return + line-feed twice

You'll get back something like this

HTTP/1.1 200 OK
Date: Fri, 03 Oct 2008 12:39:43 GMT
Server: Apache/2.2.9 (Ubuntu) DAV/2 SVN/1.5.0 PHP/5.2.6-1ubuntu4 with Suhosin-Patch mod_perl/2.0.4 Perl/v5.10.0
Last-Modified: Thu, 02 Aug 2007 20:50:09 GMT
ETag: "438118-197-436bd96872240"
Accept-Ranges: bytes
Content-Length: 407
Connection: close
Content-Type: text/html; charset=UTF-8

You can then extract the apache version from the Server: header

Typical tools you can use

You could use the HEAD utility which comes with a full install of Perl's LWP library, e.g.

HEAD http://your.webserver.com/

Or, use the curl utility, e.g.

 curl --head http://your.webserver.com/

You could also use a browser extension which lets you view server headers, such as Live HTTP Headers or Firebug for Firefox, or Fiddler for IE

Stuck with Windows?

Finally. if you're on Windows, and have nothing else at your disposal, open a command prompt (Start Menu->Run, type "cmd" and press return), and then type this

telnet your.webserver.com 80

Then type (carefully, your characters won't be echoed back)

HEAD / HTTP/1.0

Press return twice and you'll see the server headers.

Other methods

As mentioned by cfeduke and Veynom, the server may be set to return limited information in the Server: header. Try and upload a PHP script to your host with this in it

<?php phpinfo() ?>

Request the page with a web browser and you should see the Apache version reported there.

You could also try and use PHPShell to have a poke around, try a command like

/usr/sbin/apache2 -V
2 of 11
49

httpd -v will give you the version of Apache running on your server (if you have SSH/shell access).

The output should be something like this:

Server version: Apache/2.2.3
Server built:   Oct 20 2011 17:00:12

As has been suggested you can also do apachectl -v which will give you the same output, but will be supported by more flavours of Linux.

People also ask

Why should I check my Apache version?

It is crucial to keep Apache updated to maintain security and ensure it is running optimally.

🌐
liquidweb.com
liquidweb.com › home › 3 methods of checking apache version
3 Methods of Checking Apache Version | Liquid Web
How often should I check my Apache version?

It is a good practice to check Apache version regularly or when you suspect any security vulnerabilities. It is also recommended to keep your software up to date for optimal security and reliability.

🌐
liquidweb.com
liquidweb.com › home › 3 methods of checking apache version
3 Methods of Checking Apache Version | Liquid Web
What is the easiest way to check Apache version?

Checking the Apache version through WHM is the easiest method for those who are not familiar with CLI. Simply navigate to Server Status > Apache Status, and you will have access to the current installed version of Apache.

🌐
liquidweb.com
liquidweb.com › home › 3 methods of checking apache version
3 Methods of Checking Apache Version | Liquid Web
🌐
PhoenixNAP
phoenixnap.com › home › kb › web servers › how to check apache version
How to Check Apache Version | phoenixNAP KB
December 17, 2025 - Several commands allow users to check the version. 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:
🌐
IONOS
ionos.com › digital guide › server › know-how › check apache version
How to check your Apache version - IONOS
October 18, 2023 - Select “Apache Status”. ... Your current version of Apache can be found directly next to “Server Version”. In this case, the Apache version running is 2.4.56.
🌐
nixCraft
cyberciti.biz › nixcraft › howto › apache › how to find out apache version using command
How To Find Out Apache Version Using Command - nixCraft
October 19, 2022 - One can use package manger too to dig out version info. For instance, on a Debian/Ubuntu Linux, I can type the following apt command: $ apt info apache2 CentOS/RHEL/Fedora Linux user can type the following rpm command/dnf command/yum command: $ rpm -q httpd $ yum info httpd $ dnf info httpd · Last metadata expiration check: 0:00:56 ago on Sat Jun 19 04:13:31 2021.
🌐
LinuxConfig
linuxconfig.org › home › how to check apache version on linux
Check Apache Version on Linux Systems
September 21, 2025 - NOTE – DISTROS USE DIFFERENT COMMANDS On RHEL based Linux distros, OpenSUSE, and Arch Linux, the httpd command is used to interact with Apache. On other distributions, like debian and ubuntu, the apache2 command is used instead. If you are not sure which one is right for your system, check your Linux version or just use both commands to see which one works.
Find elsewhere
🌐
Broadcom
knowledge.broadcom.com › external › article › 395505 › how-to-verify-the-version-of-apache-http.html
How to Verify the version of Apache HTTP Server Installed on Siteminder Access Gateway
August 6, 2025 - This KB includes instructions on how to verify the version of Apache HTTP Server running on the Siteminder Access Gateway Server.
🌐
Hivelocity
hivelocity.net › home › knowledge base articles › how to check the apache version on a linux dedicated cpanel server
How to Check the Apache Version on a Linux Dedicated cPanel Server
December 6, 2023 - This means the easiest way to check your version number is to visit a link to a file that does not actually exist, such as: https://domain.com/unknownfile.txt. If for whatever reason, this does not show you your current Apache version, you can also check using the command line.
🌐
AlexHost
alexhost.com › home › faq › administration › how to determine the apache version on your vps
Check Apache Version on VPS Easily | AlexHost
October 7, 2024 - Enable mod_status: If not enabled, ... restart apache2`. Access the Status Page: Navigate to `http://your-server-ip/server-status` in a web browser to view Apache details....
🌐
Ava
ava.hosting › home › faq › how to check the apache version
Check Apache Version Easily on Your Server | AvaHost
April 9, 2025 - This shows both the current version and the build date. Another quick method is to use the apachectl utility: ... Output will be the same as the previous method. This tool is useful for controlling and monitoring Apache. If Apache’s ServerSignature and ServerTokens are enabled (not recommended in production), you can check the version by accessing a non-existent page or directory (e.g., /test404) and reviewing the footer of the default 404 page.
🌐
UltaHost
ultahost.com › knowledge-base › check-apache-version-linux
How to Check Apache Version in Linux | Ultahost Knowledge Base
October 8, 2024 - Enjoy the reliable performance of the best Linux system along with the flexibility of a virtual server. Experience fast speeds and low delays. ... You can use the apache2 -v command in Debian-based systems to check the version of Apache that ...
🌐
Globo.Tech
globo.tech › learning center › tutorials
How to check Apache version - Globo.Tech
March 16, 2020 - In this tutorial, we will show you how to find the version of your Apache Web server. In Debian/Ubuntu operating system, you can check the version of Apache using apachectl command:
🌐
GeeksforGeeks
geeksforgeeks.org › devops › how-to-check-apache-version
How to Check Apache Version? - GeeksforGeeks
July 23, 2025 - Operating System Compatibility: Compatibility with the underlying operating system is essential for smooth functioning. Verifying the Apache2 version ensures compatibility with the OS. Performance Optimization: Newer versions often come with performance improvements and optimizations. Checking the version allows leveraging these enhancements for better server performance.
🌐
Hostingjournalist
hostingjournalist.com › video › how-to-check-the-version-of-apache
How to check the version of Apache - HostingJournalist.com
2 weeks ago - How to check the version of Apache · This video is contributed by an external party. HostingJournalist.com is not responsible for the content provided. Published 07/22/2019 in Video by HostingJournalist Editorial Team · Report This Post · × · This video describes how to check the version of Apache on CentOS, Ubuntu and in WHM ·
🌐
Config Server Firewall
configserverfirewall.com › linux-tutorials › check-apache-version
How to Check Apache Web Server Version in Linux
October 24, 2020 - The apachectl command, which available in both Debian and RedHat based Linux distributions have -v option which prints the Apache version: ... The command displays the version number, build date and time, and Linux version.
🌐
Abdul Wahab Junaid
awjunaid.com › home › how to find the apache web server version
How to find the Apache Web Server version | Abdul Wahab Junaid
September 2, 2023 - Replace the file path with the actual location of your Apache configuration file. For Windows, you can open the httpd.conf file in a text editor and search for the “Server version” directive.
🌐
PHP
php.net › manual › en › function.apache-get-version.php
PHP: apache_get_version - Manual
So use; <?php if(function_exists("apache_get_version")){ $AVerpache = apache_get_version(); } else { $AVerpache = "unknown"; } print $AVerpache; ?> The following may work on your server and return "Apache/x.x.xx" <?php print $_SERVER["SERVER_SOFTWARE"]; ?> but on mine it only returns "Apache".