-
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 -vgives the version, likeServer version: Apache/2.4.9 (Win64), -
httpd -Vgives the version, MPM to guess Prefork or whatever, HTTPD_ROOT and SERVER_CONFIG_FILE settings to find the root configuration file, -
httpd -Sgives the existing virtual hosts, -
httpd -Mgives the modules (to check php5, and useful modules), -
httpd -tchecks 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 -vgives the version, likenginx version: nginx/1.6.2, -
nginx -Vgives then version and conf-path settings to find the root configuration file, like--conf-path=conf/nginx.conf -
nginx -tchecks 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 ...