Cara cek versi Apache

Kali ini pembahasan yang mudah saja atas permintaan yang masuk lewat email. 🙂 Umumnya yang baru pindahan dari shared hosting ke VPS akan menggunakan LAMP (Linux, Apache, MySQL dan PHP) karena masih familiar dibandingkan yang nekat ke Nginx karena sudah berbeda jauh konfigurasinya. Nah… instalasi Apache sendiri sudah diatur otomatis oleh repositorynya dan terima jadi saja, karena itu wajar apabila tidak tahu berapa versinya.

Pertama pastikan dulu proses Apache (httpd) aktif berjalan dalam VPS dan kemudian ketikkan perintah berikut:

httpd -V

atau

apache2 -V

atau

apachectl -V

Nanti akan muncul keterangan lengkap mengenai web servernya dan parameter kompilasi yang digunakan:

Server version: Apache/2.2.15 (Unix)
Server built:   Aug 24 2015 17:50:06
Server's Module Magic Number: 20051115:25
Server loaded:  APR 1.3.9, APR-Util 1.3.9
Compiled using: APR 1.3.9, APR-Util 1.3.9
Architecture:   32-bit
Server MPM:     Prefork
  threaded:     no
    forked:     yes (variable process count)
Server compiled with....
 -D APACHE_MPM_DIR="server/mpm/prefork"
 -D APR_HAS_SENDFILE
 -D APR_HAS_MMAP
 -D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
 -D APR_USE_SYSVSEM_SERIALIZE
 -D APR_USE_PTHREAD_SERIALIZE
 -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
 -D APR_HAS_OTHER_CHILD
 -D AP_HAVE_RELIABLE_PIPED_LOGS
 -D DYNAMIC_MODULE_LIMIT=128
 -D HTTPD_ROOT="/etc/httpd"
 -D SUEXEC_BIN="/usr/sbin/suexec"
 -D DEFAULT_PIDLOG="run/httpd.pid"
 -D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
 -D DEFAULT_LOCKFILE="logs/accept.lock"
 -D DEFAULT_ERRORLOG="logs/error_log"
 -D AP_TYPES_CONFIG_FILE="conf/mime.types"
 -D SERVER_CONFIG_FILE="conf/httpd.conf"

Ya sudah selesai sih mendapatkan yang kita inginkan. Haha. 😀

Tapi saya tambahkan satu hal lagi: Apache sendiri memiliki modul – modul yang bisa menambahkan kemampuannya dengan fitur – fitur baru, misal kita ingin tahu apa saja modul yang tersedia dan dimuat atau tidak maka ada caranya. Langsung kita eksekusi perintah berikut:

httpd -M

Akan muncul balasan seperti ini:

Loaded Modules:
 core_module (static)
 mpm_prefork_module (static)
 http_module (static)
 so_module (static)
 auth_basic_module (shared)
 auth_digest_module (shared)
 authn_file_module (shared)
 authn_alias_module (shared)
 authn_anon_module (shared)
 authn_dbm_module (shared)
 authn_default_module (shared)
 authz_host_module (shared)
 authz_user_module (shared)
 authz_owner_module (shared)
 authz_groupfile_module (shared)
 authz_dbm_module (shared)
 authz_default_module (shared)
 ldap_module (shared)
 authnz_ldap_module (shared)
 include_module (shared)
 log_config_module (shared)
 logio_module (shared)
 env_module (shared)
 ext_filter_module (shared)
 mime_magic_module (shared)
 expires_module (shared)
 deflate_module (shared)
 headers_module (shared)
 usertrack_module (shared)
 setenvif_module (shared)
 mime_module (shared)
 dav_module (shared)
 status_module (shared)
 autoindex_module (shared)
 info_module (shared)
 dav_fs_module (shared)
 vhost_alias_module (shared)
 negotiation_module (shared)
 dir_module (shared)
 actions_module (shared)
 speling_module (shared)
 userdir_module (shared)
 alias_module (shared)
 substitute_module (shared)
 rewrite_module (shared)
 proxy_module (shared)
 proxy_balancer_module (shared)
 proxy_ftp_module (shared)
 proxy_http_module (shared)
 proxy_ajp_module (shared)
 proxy_connect_module (shared)
 cache_module (shared)
 suexec_module (shared)
 disk_cache_module (shared)
 cgi_module (shared)
 version_module (shared)
 php5_module (shared)
Syntax OK

Ya perintah – perintah seperti ini penting apabila kita ingin mendiagnosa masalah atau sekedar ingin mengupgrade ke versi terbarunya. Memang sangat jarang digunakan.

Tinggalkan Balasan

Alamat email Anda tidak akan dipublikasikan. Ruas yang wajib ditandai *