Configuring an instance of IBM HTTP Server on the z/OS system
You can configure an instance of IBM® HTTP Server on the z/OS® operating system. IBM HTTP Server Version 9 for WebSphere® Application Server for z/OS is a base element of z/OS V2R2 and later. You must configure an instance of IBM HTTP Server on the z/OS operating system after installing.
Before you begin
Attention: IBM HTTP Server version 9.0 now
installs with the base operating system on z/OS V2R2 and
later. No separate installation is required. IBM HTTP Server
version 9 installs in the /usr/lpp/ihsa_zos directory. You can perform a
separate installation of IBM HTTP Server version 9.0
installing the base operating system on z/OS V2R1 and earlier
using the IBM Installation Manager. For details on a separate installation, refer to Installing IBM HTTP Server for WebSphere Application Server for z/OS. After the installation, you then run the
install_ihs
script to create an instance of IBM HTTP Server version
9.0.Prior to using the installer program:
- Create a System Authorization Facility (SAF) user ID and group for IBM HTTP Server. For more information, see Performing required z/OS system
configuration.
The examples that follow in this topic assume a server user ID of WWWSERV and a server group of WWWGROUP.
- If you are using IBM HTTP Server with WebSphere
Application Server, create an installation directory for the configuration files for the server
instance. For more information, see the topic about migrating and installing IBM HTTP Server on z/OS systems.The examples that follow in this topic assume an installation directory of /etc/websrv1. Set the directory permissions to 770 and the directory ownership to the server user ID and group:
mkdir /etc/websrv1 chown WWWSERV:WWWGROUP /etc/websrv1 chmod 770 /etc/websrv1
- If you are installing the product for the first time, then enable the
administrative console to modify the httpd.conf file by adding the WebSphere Application Server control region user ID to the
IBM HTTP Server group using SAF. For example, to add a user
ASCR1 to the group WWWGROUP, type the following
command:
CONNECT ASCR1 GROUP (WWWGROUP) OWNER (WWWGROUP)
Attention: IBM HTTP Server on z/OS V2R2 installs with the base operating system and no
separate installation is required. For older releases of z/OS, follow the IBM Installation Manager
information in this topic.
About this task
Procedure
Results
Perform the following steps to confirm that you have successfully installed a running version of the product on your machine:
- Log in to the OMVS shell using the server user ID. Verify that the server user ID has a non-zero
UID value. Change the directory to the server instance's installation
directory:
cd /etc/websrv1
- Run the following commands to verify the installation of the program: apachectl
-v and apachectl configtestThe following sample output is an example of a successful program installation:
The actual version string and build date varies.# bin/apachectl -v Server version: IBM_HTTP_Server/8.5.0.0 (Unix) Server built: Jan 9 2012 11:20:34 # bin/apachectl configtest Syntax OK
- Start IBM HTTP
Server.
bin/apachectl start
- Point a web browser to the IP name or address of your z/OS system, using either the non-SSL port number you specified when running the installer program, or the default port of 80. You should see the IBM HTTP Server default home page.
- Stop IBM HTTP Server by running the following
command:
bin/apachectl stop
What to do next
- If you are using IBM HTTP Server with WebSphere Application Server, install and configure the WebSphere Application Server plug-in for IBM HTTP Server
- For information about editing the IBM HTTP Server
configuration file, httpd.conf, and information about supported Apache modules,
see the topic about configuring IBM HTTP Server.Typical changes that you can make to the configuration file are:
- Edit the DocumentRoot directive to point to the Web pages for your site.
- Enable the WebSphere Application Server plug-in for
IBM HTTP Server by adding the following directives to the end
of
httpd.conf:
LoadModule was_ap22_module <plugin_config_hfs>/bin/mod_was_ap22_http.so WebSpherePluginConfig /path/to/existing/plugin-cfg.xml
If the plug-in configuration file has been used with a WebSphere Application Server Version 5.0 or 5.1 plug-in, then the file is in EBCDIC. Before using the file with this WebSphere Application Server Version 6.0 or higher plug-in, you need to convert it to ASCII. The following example is for converting the plug-in configuration file from EBCDIC to ASCII:$ iconv -f IBM1047 -t ISO8859-1 < /path/to/existing/plugin-cfg.xml \ > /path/to/ascii/plugin-cfg.xml
- Enable SSL support by adding the following directives to the end of
httpd.conf:
The Keyfile directive can instead specify an HFS file name using the syntax:LoadModule ibm_ssl_module modules/mod_ibm_ssl.so Listen 443 <VirtualHost *:443> SSLEnable </VirtualHost> SSLDisable Keyfile /saf saf-keyring-name
Keyfile /path/to/keyfile.kdb
. The .sth file must be in the same directory as the .kdb file. For more information, see tihs_setupssl.html and rihs_ssldirs.html. - Enable mod_status by removing the comment delimiter in the default configuration file highlighted
in the following example:
If you want to restrict access to specific networks, uncomment the sample mod_access configuration, but modify the Allow from directive to specify the proper domain or network.<IfModule mod_status.c> ExtendedStatus On </IfModule> ... #<Location /server-status> # SetHandler server-status # Order deny,allow # Deny from all # Allow from .example.com #</Location>
- You can install the Web server to an HFS shared R/W by multiple hosts in a sysplex.There are special configuration requirements for components of the Web server which utilize AF_UNIX sockets. AF_UNIX sockets are not supported by an HFS which are shared R/W, so configuration directives are used to place the AF_UNIX sockets on a filesystem owned by the host on which the Web server runs.
- If mod_ibm_ssl is loaded, use the SSLCachePortFilename directive to specify a file on a filesystem owned by the local host.
- If mod_fastcgi is loaded, use the FastCGIIpcDir directive to specify a directory on a filesystem owned by the local host.
- If you are using IBM HTTP Server with WebSphere
Application Server, add support for the administrative console after the initial installation.
- Run the bin/enable_admin script to set the permissions needed to modify the httpd.conf file from the administrative console.
- To modify the httpd.conf file from the administrative console, you must add the control region
user ID to the IBM HTTP Server group using SAF. For example,
to add a user ASCR1 to the group WWWGROUP, type the following
command:
CONNECT ASCR1 GROUP (WWWGROUP) OWNER (WWWGROUP)
- To use the administrative console to start and stop IBM HTTP Server, you must create a cataloged JCL procedure. For information, see the topic about using JCL procedures to start IBM HTTP Server on z/OS. Ensure that the JCL procedure is assigned to the user and group you defined for IBM HTTP Server. For more information, see Performing required z/OS system configuration.