Hack 82. Display the httpd version and build parameters

by Ramesh

Use option -V (upper-case V), to display Apache version number and all the parameters that are used while building the Apache.

  1. # httpd –V
  2.  
  3. Server version: Apache/2.2.9 (Unix)
  4. Server built: Jul 14 2008 15:36:56
  5. Servers Module Magic Number: 20051115:15
  6. Server loaded: APR 1.2.12, APR-Util 1.2.12
  7. Compiled using: APR 1.2.12, APR-Util 1.2.12
  8. Architecture: 32-bit
  9. Server MPM: Prefork
  10. threaded: no
  11. forked: yes (variable process count)
  12. Server compiled with….
  13. -D APACHE_MPM_DIR=”server/mpm/prefork
  14. -D APR_HAS_SENDFILE
  15. -D APR_HAS_MMAP
  16. -D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
  17. -D APR_USE_SYSVSEM_SERIALIZE
  18. -D APR_USE_PTHREAD_SERIALIZE
  19. -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
  20. -D APR_HAS_OTHER_CHILD
  21. -D AP_HAVE_RELIABLE_PIPED_LOGS
  22. -D DYNAMIC_MODULE_LIMIT=128
  23. -D HTTPD_ROOT=”/etc/httpd
  24. -D SUEXEC_BIN=”/usr/sbin/suexec
  25. -D DEFAULT_PIDLOG=”logs/httpd.pid
  26. -D DEFAULT_SCOREBOARD=”logs/apache_runtime_status
  27. -D DEFAULT_LOCKFILE=”logs/accept.lock
  28. -D DEFAULT_ERRORLOG=”logs/error_log
  29. -D AP_TYPES_CONFIG_FILE=”conf/mime.types
  30. -D SERVER_CONFIG_FILE=”conf/httpd.conf

If you want display only the Apache version number, use the option -v (lower-case v) as shown below.

  1. # httpd -v
  2.  
  3. Server version: Apache/2.2.9 (Unix)
  4. Server built: Jul 14 2008 15:36:56