Apache Web Server

IHS = IBM HTTP Server, is based on the Apache HTTP Server

To find compiled in modules available on the server

httpd -l

./httpd: error while loading shared libraries: libaprutil-0.so.0: 
cannot open shared object file: No such file or directory

If you get the above error try

apachectl -l
Compiled in modules:
  core.c
  worker.c
  http_core.c
  mod_suexec.c
  mod_so.c

Apache info

apachectl -V
Server version: IBM_HTTP_Server/6.0.2.35 Apache/2.0.47
Server built:   Feb 22 2009 12:24:09
Build level:    IHS60/webIHS0911.03
Server's Module Magic Number: 20020803:3
Architecture:   32-bit
Server compiled with....
 -D APACHE_MPM_DIR="server/mpm/worker"
 -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 HTTPD_ROOT="/opt/IBM/IHS"
 -D SUEXEC_BIN="/opt/IBM/IHS/bin/suexec"
 -D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
 -D DEFAULT_ERRORLOG="logs/error_log"
 -D AP_TYPES_CONFIG_FILE="conf/mime.types"
 -D SERVER_CONFIG_FILE="conf/httpd.conf"
Apache vulnerability fixes included:
  CVE-2002-1156  CVE-2002-0840  CVE-2003-0132  CVE-2003-0134
  CVE-2003-0189  CVE-2003-0245  CVE-2003-0254  CVE-2003-0253
  CVE-2003-0192  CVE-2003-0789  CVE-2003-0542  CVE-2004-0174
  CVE-2004-0493  CVE-2004-0747  CVE-2004-0786  CVE-2004-0809
  CVE-2004-0942  CVE-2003-0020  CVE-2005-2088  CVE-2005-2728
  CVE-2005-2491  CVE-2005-2970  CVE-2005-3352  CVE-2006-3918
  CVE-2006-3747  CVE-2006-5752  CVE-2007-1863  CVE-2007-3847
  CVE-2007-3304  CVE-2007-6203  CVE-2007-5000  CVE-2007-6388
  CVE-2008-2364  CVE-2008-2939

Display RPMs

rpm -qa | grep -i ihs
IHS6.ssl-6.0-0
IHS6.base.application_files.progexe-6.0-0
IHS6.base.doc.man-6.0-0

Apache control commands

apachectl stop

apachectl start

apachectl restart - Stops server and restarts it again, current requests are aborted

apachectl graceful - Each thread or process serving a client will keep processing the current request , when it is finished it will be killed and replaced by a new thread or process with the new configuration (if httpd.conf had been modified) - no web server downtime

Check syntax of httpd.conf file

apachectl configtest
Syntax OK

Test connectivity to SSL enabled website, in this case it fails

openssl s_client -connect localhost:443
connect: Connection refused
connect:errno=29

Check for running httpd processes

ps -ef | grep httpd
root      4981     1  0 May31 ?        00:00:04 /opt/IBM/IHS/bin/httpd -d /opt/IBM/IHS -k start
nobody    4984  4981  0 May31 ?        00:00:00 /opt/IBM/IHS/bin/httpd -d /opt/IBM/IHS -k start
nobody   16185  4981  1 16:21 ?        00:00:16 /opt/IBM/IHS/bin/httpd -d /opt/IBM/IHS -k start
nobody   16389  4981  1 16:22 ?        00:00:16 /opt/IBM/IHS/bin/httpd -d /opt/IBM/IHS -k start
nobody   16822  4981  2 16:24 ?        00:00:14 /opt/IBM/IHS/bin/httpd -d /opt/IBM/IHS -k start
nobody   17054  4981  1 16:25 ?        00:00:13 /opt/IBM/IHS/bin/httpd -d /opt/IBM/IHS -k start

Check for port and address on which apache is listening, and for connected sessions

lsof | grep httpd | grep IPv
netstat -ntlp