Version of Apache installed on a Debian machine

If none of the more specific forums is the right place to ask

Version of Apache installed on a Debian machine

Postby Andrew778 » 2018-12-25 04:24

How can I check which version of Apache is installed on a Debian machine?

Is there a command for doing this?
Andrew778
 
Posts: 1
Joined: 2018-11-13 06:17

Re: Version of Apache installed on a Debian machine

Postby GarryRicketson » 2018-12-25 04:31

Yes there is a command for that.
How can I check which version of Apache is installed on a Debian machine?
But it will take me a few seconds, I don't remember offhand. When I have it, I will edit this and show you the exact command
========edit======
I don't use apache myself so I can not verify this, but you can try it:
Code: Select all
httpd -v or /usr/local/apache/bin/httpd -v

======= edit again=====
It is going to depend on what version of Debian , I think, any way if the above did not work
try this, it does work for me:
Code: Select all
@debian:~$ /usr/sbin/apache2 -v
Server version: Apache/2.2.22 (Debian)
Server built:   Jul 20 2016 05:07:11
@debian:~$
 

And then from one of the many hits, in the search:
https://stackoverflow.com/questions/289586/version-of-apache-installed-on-a-debian-machine
ou should use apache2ctl -v or apache2 -v for newer Debian or Ubuntu distributions.
Code: Select all
apache2ctl -v

And last but probably what you should try first:
Code: Select all
man apache2
or 'man apache', The manual should show what version you have and it should be the same as the version you are using, but it will also show the command to check the version.
from apache2 manual:
APACHE2(8) apache2 APACHE2(8)

NAME
apache2 - Apache Hypertext Transfer Protocol Server

SYNOPSIS
apache2 [ -d serverroot ] [ -f config ] [ -C directive ] [
-c directive ] [ -D parameter ] [ -e level ] [ -E file ] [
-k start|restart|graceful|stop|graceful-stop ] [ -R direc���
tory ] [ -h ] [ -l ] [ -L ] [ -S ] [ -t ] [ -v ] [ -V ] [
-X ] [ -M ]

SUMMARY
apache2 is the Apache HyperText Transfer Protocol (HTTP)
server program. It is designed to be run as a standalone
daemon process. When used like this it will create a pool
of child processes or threads to handle requests.

In general, apache2 should not be invoked directly, but
rather should be invoked via /etc/init.d/apache2 or
apache2ctl. The default Debian configuration requires envi���
ronment variables that are defined in /etc/apache2/envvars
and are not available if apache2 is started directly. How���
ever, apache2ctl can be used to pass arbitrary arguments to
apache2.
====snip====comment: maybe read the entire manual , if you know how===
In the options it says :
-v Print the version of apache2, and then exit.

==============edited again====
Not intentionally being critical, or a "smart alec", nor rude, but as anyone can see, at first I did not know the answer, off hand, same as the OP, but really all they needed to do was take a quick look at the manual, and they would have found the answer,.... just saying.
User avatar
GarryRicketson
 
Posts: 5237
Joined: 2015-01-20 22:16
Location: Durango, Mexico

Re: Version of Apache installed on a Debian machine

Postby stevepusser » 2018-12-26 17:48

You can also just run in Stretch or above:

Code: Select all
apt policy apache2


before Stretch:

Code: Select all
apt-cache policy apache2


Here are versions for different releases of Debian: https://packages.debian.org/search?sear ... ds=apache2
The MX Linux repositories: Backports galore! If we don't have something, just ask and we'll try--we like challenges. New packages: Flightgear 2018.2.2, 4.19.13 kernel, wine-staging 4.0~rc4, Stellarium 0.18.3, VLC 3.0.5, Midori 7.0
User avatar
stevepusser
 
Posts: 10429
Joined: 2009-10-06 05:53


Return to General Questions

Who is online

Users browsing this forum: No registered users and 3 guests

fashionable