Skip to content

Apache httpd

Common parts of every card are described in Monitor window.

Detected by systemd units apache2, apache2@*, httpd, httpd@*, or binaries apache2, apache2ctl, apachectl, httpd
Read every 60 s while the Monitor window shows the tab
Active probe none
Test config apache2ctl/httpd/apachectl -t -D DUMP_VHOSTS (on demand)
  • Version from -v of a trusted binary (prints the version and exits before reading the configuration), under timeout 5, with the active probe only.
  • Configuration file and server root (guessed: no -d, APACHE_CONFDIR or ServerRoot when none of them is known), MPM and the modules of LoadModule (up to 300).
  • Listen (up to 100) and Ports.
  • Processes: running apache2/httpd processes (none visible to this session, or unknown (/proc not readable)).
  • Main server and Virtual hosts (up to 400): ServerName with aliases, Address and port, Serves (DocumentRoot, ProxyPass, Redirect; up to 60 rules), TLS (SSLCertificateFile with its expiry from the TLS certificates card), File (file and line of <VirtualHost>).
  • Problems while reading the configuration, as on the nginx card.

Passive, as the session’s user. The running master process is found in /proc/<pid>/comm (apache2/httpd whose parent is not one); only its -f, -d and binary path leave the host. The configuration is read by a shell reader that follows Include/IncludeOptional (up to 300 files), under timeout 20. A filter on the host prints only listed directives with filtered fields: URLs without userinfo and query string; nothing of Define, SetEnv, headers, <If> expressions or <Macro> bodies.

apachectl -S, -t, -M and -V are never run automatically: they load every module (mod_perl and mod_wsgi run code) and resolve names.

The binary, in this order:

  • apache2ctl -t -D DUMP_VHOSTS (Debian: the binary needs envvars, which only apache2ctl reads), with APACHE_CONFDIR from the unit when set; the configuration is <dir>/apache2.conf, default /etc/apache2. Note: apache2ctl sources envvars (shell code) and may create $APACHE_RUN_DIR and $APACHE_LOCK_DIR.
  • httpd [-d <root>] [-f <file>] -t -D DUMP_VHOSTS with the unit’s last -d and -f; without them the files of the running master by the last probe; otherwise httpd’s built-in file (ownership checked on /etc/httpd/conf/httpd.conf; OPTIONS of /etc/sysconfig/httpd are not read).
  • apachectl -t -D DUMP_VHOSTS.

What it does, as the card says: parses the whole configuration like a start does, without starting the server or signalling the running one, and lists the virtual hosts (-D DUMP_VHOSTS, without the Define: lines of -S); loads every module of LoadModule (mod_perl, mod_wsgi and the like can run code from the configuration), resolves the names of ServerName and <VirtualHost>, may open log files; TLS keys are not loaded.

The ownership check covers the binary, the main file and up to 50 included files of the last probe.

Shown with Copy / Paste to terminal, never run by KryoDesk:

Label Command Why manual
Virtual hosts and run settings apachectl -S loads every module like the test and also prints every Define: with its value (values can hold passwords)
Loaded modules apachectl -M loads every module of the configuration
Build settings and MPM apachectl -V with a loadable MPM it reads the configuration

(apache2ctl instead of apachectl when that is what the host has.)

Scroll or pinch to zoom · drag to move · double-click to zoom · Esc or click outside to close