How can I tell what version of apache I'm running?

  • I know about the phpinfo() way but is there any other way? I'm using CentOS and I can't find the httpd executable to run httpd -v.

  • jsbillings

    jsbillings Correct answer

    10 years ago

    Either rpm -q httpd or /usr/sbin/httpd -v should work.

    Thanks! I kept looking in /sbin instead of /usr/sbin but both of those worked! Hopefully Google will index this answer instead of the garbage that is out there.

    @tooshel: You could have tried locate. "locate bin/httpd". Assuming it's installed, not sure it's standard on CentOS.

    Yeah, we do have locate . . . I found out because another colleague was convinced I didn't move something because the "locate" index was not updated. I still always forget it's there! Thanks!

    Can confirm this works on Mac OS El Capitan.

License under CC-BY-SA with attribution


Content dated before 6/26/2020 9:53 AM