Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to check apache version

Tags:

centos

CentOS 6.9 There are 2 versions of apache are existing on my CentOS. One installed by "make install httpd", another installed by "yum install httpd". How do I check what version are running

like image 232
Hser Avatar asked Jan 09 '18 02:01

Hser


People also ask

How do I find Apache version in Windows?

Find the Server Status section and click Apache Status. You can start typing “apache” in the search menu to quickly narrow your selection. The current version of Apache appears next to the server version on the Apache status page.

Where is Apache installed on Linux?

The location of the Apache configuration file On most systems if you installed Apache with a package manager, or it came preinstalled, the Apache configuration file is located in one of these locations: /etc/apache2/httpd. conf. /etc/apache2/apache2.


2 Answers

You can check Apache Version in Ubuntu by using this Command -

apachectl -v

The Result will be like this -

vishal@vishal:~$ apachectl -v
Server version: Apache/2.4.41 (Ubuntu)
Server built:   2020-08-12T19:46:17
like image 149
Vishal Thakur Avatar answered Oct 18 '22 08:10

Vishal Thakur


You first need to find out where are those binaries stored. For this you may use the whereis command.

whereis httpd

The output will give you the different path for the files httpd like this:

httpd: /usr/sbin/httpd /usr/lib64/httpd /etc/httpd /usr/share/httpd /usr/share/man/man8/httpd.8.gz

Then, for the binaries, you can check the version using the path with the attribute -v

/usr/sbin/httpd -v

Output:

Server version: Apache/2.4.6 (CentOS)
Server built:   Oct 19 2017 20:39:16

For the yum installed version, you may also use the following command:

sudo yum list installed httpd
Installed Packages
httpd.x86_64                          2.4.6-67.el7.centos.6

Another last solution is to use: rpm -q httpd

like image 27
Kevin Lemaire Avatar answered Oct 18 '22 08:10

Kevin Lemaire