To view possible options of apachectl – web server Apache server control interface run command:
root@shkodenko:~# apachectl --help Usage: /usr/sbin/apachectl start|stop|restart|graceful|graceful-stop|configtest|status|fullstatus|help /usr/sbin/apachectl <apache2 args> /usr/sbin/apachectl -h (for help on <apache2 args>) root@shkodenko:~#
To view full version information run:
root@shkodenko:~# apachectl -V Server version: Apache/2.2.22 (Debian) Server built: Feb 1 2014 21:26:04 Server's Module Magic Number: 20051115:30 Server loaded: APR 1.4.6, APR-Util 1.4.1 Compiled using: APR 1.4.6, APR-Util 1.4.1 Architecture: 64-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 APR_HAS_OTHER_CHILD -D AP_HAVE_RELIABLE_PIPED_LOGS -D DYNAMIC_MODULE_LIMIT=128 -D HTTPD_ROOT="/etc/apache2" -D SUEXEC_BIN="/usr/lib/apache2/suexec" -D DEFAULT_PIDLOG="/var/run/apache2.pid" -D DEFAULT_SCOREBOARD="logs/apache_runtime_status" -D DEFAULT_LOCKFILE="/var/run/apache2/accept.lock" -D DEFAULT_ERRORLOG="logs/error_log" -D AP_TYPES_CONFIG_FILE="mime.types" -D SERVER_CONFIG_FILE="apache2.conf" root@shkodenko:~#
To view list of compiled-in modules execute:
root@shkodenko:~# apachectl -l Compiled in modules: core.c mod_log_config.c mod_logio.c mod_version.c prefork.c http_core.c mod_so.c root@shkodenko:~#
To check web server Apache syntax run:
root@shkodenko:~# apachectl configtest Syntax OK root@shkodenko:~#
To restart web server Apache gracefully run command:
root@shkodenko:~# apachectl graceful