65

how to find out the Apache server version installed in Ubuntu 14.04?

98

Open the terminal and type:

apache2 -v   

-v Print the version of apache2, and then exit.

| improve this answer | |
5

From the terminal you can enter

apachectl -v

or to get even more compile info on Apache enter

apachectl -V

of course as mention by @karel you can also use apache2 instead of apachectl... just giving an alternative. This worked for me in Ubuntu 18.04 and I'm using Apache 2.4.37.

| improve this answer | |
  • this was a solved question from march 2015. why and how is your alternative answer any useful ? – Ali Çarıkçıoğlu Feb 11 '19 at 21:09
  • I guess if you run the same command twice, you get a different result? – Charles Green Feb 11 '19 at 22:26
  • One is a lowercase v and the other is an uppercase V which could be different levels of verbosity for apachectl, but I can't find any indication these flags exist in the manpage. – Kristopher Ives Feb 13 '19 at 6:14
  • 1
    @Ali Çarıkçıoğlu, well for one thing karel's solution didn't work for me at all with Apache 2.2.22 (not pre-installed). Both solutions from god_is_love were very useful for me. – MiB Mar 12 '19 at 3:08
  • This solution also helped us (and the first didn't). Admittedly, this isn't on ubuntu 14.04, but the title didn't disclose that, and we ended up here nonetheless. – abathur Mar 22 '19 at 14:29
0

if you have PHP installed with you apache2, you can find it in $_SERVER variable or with phpinfo() function:

<?php
var_dump($_SERVER);
phpinfo();

returns (on my computer):

'SERVER_SIGNATURE' => string '<address>Apache/2.4.29 (Ubuntu) Server …</address>
'SERVER_SOFTWARE' => string 'Apache/2.4.29 (Ubuntu)'

# and in phpinfo arrays:
apache2handler
Apache Version  Apache/2.4.29 (Ubuntu) 
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.