-
Notifications
You must be signed in to change notification settings - Fork 0
Webserver Analysis
httpd
(apachectl
on Debian distribution) is the controller to get informations about version and configuration.
-
httpd -v
gives the version, likeServer version: Apache/2.4.9 (Win64)
, -
httpd -V
gives the version, MPM to guess Prefork or whatever, HTTPD_ROOT and SERVER_CONFIG_FILE settings to find the root configuration file, -
httpd -S
gives the existing virtual hosts, -
httpd -M
gives the modules (to check php5, and useful modules), -
httpd -t
checks the syntax.
If SERVER_CONFIG_FILE begins with a /
, it's an absolute path. If not, concatenation of HTTPD_ROOT and SERVER_CONFIG_FILE gives the absolute path of the root configuration file.
On Windows(tm), with Wampserver, HTTPD_ROOT is /apache and does not match the real path.
A shell command like cat SERVER_CONFIG_FILE | sed -e '/^$/d' -e '/^\s*#/d' > server.conf
gives all the active lines
A shell command like egrep 'Include' server.conf | sed 's/\s*Include \(.*\)/\1/'
gives a list of file and directory patterns to look at. But it doesn't care of <IfDefine>
, <IfModule>
directives, so ...
nginx
is the controller to get informations about version and configuration.
-
nginx -v
gives the version, likenginx version: nginx/1.6.2
, -
nginx -V
gives then version and conf-path settings to find the root configuration file, like--conf-path=conf/nginx.conf
-
nginx -t
checks the syntax.
A shell command like cat conf-path | sed -e '/^$/d' -e '/^\s*#/d' > server.conf
gives all the active lines
A shell command like egrep 'include' server.conf | sed 's/\s*include\s+\(.*\)/\1/'
gives a list of file and directory patterns to look at.
Soon ...
Soon ...