How to find Apache version via Command Line

apache feather logo

A long time ago, we published an item which showed how to discover your Apache version on a Plesk installation. Sometimes, people land in there looking to find their Apache version when they don’t have Plesk.

Command Line Instructions

For those occasions, the below should work via Terminal, when accessing your server via command line, over SSH.

httpd -v

or you could use

rpm -q httpd

if this doesn’t work then

/usr/sbin/apache2 -v

This should display visually to you the exact server version and build date.

Example httpd -v output

For example, on one of my instances, it looks like this:

Server version: Apache/2.4.7 (Ubuntu)
Server built: Jun 21 2015 13:21:38

If you only have FTP/SFTP Access

What if you don’t have SSH access? If PHP is installed, you can try using a PHPinfo.php file which will expose this (and a host of other) information to you.

Leave a Reply

Your email address will not be published. Required fields are marked *