Installing and configuring IBM HTTP Server on the z/OS V2R2 and later systems
You can use the
install_ihs installer program to configure an instance
of IBM® HTTP Server on the z/OS® operating system. Before you begin using IBM HTTP Server, you must
create an instance of the server with the
as detailed in the following procedure.
Before you begin
/usr/lpp/ihsa_zos/bin/install_ihsscript to the preinstalled location at
/usr/lpp/ihsa_zosor you can perform a separate installation using the IBM Installation Manager. For details on a separate installation, refer to Installing IBM HTTP Server for WebSphere Application Server for z/OS V2R1 and earlier. In either case, before using IBM® HTTP Server create an instance of the IBM® HTTP Server using the
- 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 following examples assume a server user ID of WWWSERV and a server group of WWWGROUP.
- Choose a directory to hold the configuration files for the server instance. This directory is
sometimes referred to as the installation directory for the server instance. Because the directory
contains both the configuration and the run-time logs for the server instance, you might want to
create a separate filesystem for it.The examples that follow 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 /usr/sbin/mount -f OMVS.SYS1.WEBSRV1.ZFS /etc/websrv1 chown WWWSERV:WWWGROUP /etc/websrv1 chmod 770 /etc/websrv1
About this task
Log in to the z/OS
UNIX System Services shell with the user ID that runs the
Use either the server user ID discussed in the Before you begin section, or another user ID in the server group that you use for administration. Change the directory to the IBM HTTP Server product code directory:
Set the umask value to 022 by specifying
To verify that the umask value is set to 022, run the umask command with no parameters.
Run the bin/install_ihs program to install the product files into the
installation directory, perform initial customization, and create symbolic links from the
installation directory to the product directory.
install_ihs installDir serverPort
The following example creates a configuration in the /etc/websrv1 directory for a web server that listens on port 8080:
- The installDir variable is the absolute path to the installation directory, which holds the server instance configuration.
- The serverPort variable is the non-SSL port for the web server. If you omit the serverPort variable, the default is port 80.
install_ihs /etc/webserv1 8080You can add several more options to perform initial customization and setup of the server instance:
- Add the -31 parameter to have the installer create a 31-bit instance of IBM HTTP Server. This parameter must be used only if IBM HTTP Server is being used in combination with a product other
than WebSphere Application Server. Products that require
IBM HTTP Server to run in 31-bit mode document the requirement
of passing this flag.
install_ihs -31 /etc/websrv1 8080
- Add the -admin parameter to allow the WebSphere Application Server administration console to modify the
httpd.conf file. (A WebSphere
Application Server for z/OS node must be running on the same
system as the IBM HTTP Server instance.)
You must also add the WebSphere Application Server control region user ID to the IBM HTTP Server group by using SAF. For example, to add a user
install_ihs -admin /etc/websrv1 8080
ASCR1to the group
WWWGROUP, enter the following TSO command:
CONNECT ASCR1 GROUP (WWWGROUP) OWNER (WWWGROUP)
- If for any reason the IBM HTTP Server group is not the
default group for the user ID that is used to run the install_ihs installer program, you can name
the IBM HTTP Server group explicitly with the
install_ihs -admin -group IMGROUP /etc/websrv1 8080
- Starting with Fix Pack 184.108.40.206, the IBM HTTP Server product code also contains the WebSphere Application Server plug-ins for IBM HTTP
Server in the /usr/lpp/ihsa_zos/plugin directory. Beginning with this fix pack,
you can add more parameters to the installer command to configure the plug-in when you create the
install_ihs -plugin -wasInstallLocation wasProductDir -wasServerName serverName -wasHostName serverHost installDir serverPort
The -plugin parameter indicates that the WebSphere Application Server plug-in is to be configured.
The -wasInstallLocation parameter points to the WebSphere Application Server for z/OS product code. If it is not specified, a value of
The -wasServerName parameter is required if the -plugin parameter is specified. This parameter provides the name by which the web server is known in the WebSphere Application Server configuration.
The -wasHostName parameter is required if the -plugin parameter is specified, and provides the host name for the web server instance.
By default, the plug-in configuration is placed in the installDir/plugin/config/serverName/plugin-cfg.xml file, and the installDir/config/httpd.conf server configuration file is updated to refer to the WebSphere Application Server product. You can use more options on the installer command to change these values. For more information, enter the install_ihs -help command.The following example starts the installer program to create a web server instance and configure the WebSphere Application Server plug-in.
install_ihs -plugin -wasInstallLocation /products/WAS90 -wasServerName webserver1 -wasHostName host2.mycorp.com /etc/websrv1 8080
Create multiple instances of IBM HTTP Server by running
the IBM HTTP Server installer program more than once.
Specify a different installation directory and, in most cases, a different port each time that you run the installer program.
Perform the following steps to confirm that you successfully installed a running version of the product on your z/OS operating system:
- Log in to the OMVS shell by using the server user ID.
- Change the directory to the installation directory of the server
- Run the apachectl -v and apachectl configtest commands to
verify the installation of the program.The 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/220.127.116.11 (Unix) Server built: Jan 27 2016 12:38:02 # bin/apachectl configtest Syntax OK
- Start IBM HTTP
- Point a web browser to the IP name or address of your z/OS system by using either the non-SSL port number you specified when you ran the installer
program, or the default port of 80.
If the installation is successful, the IBM HTTP Server default home page displays.
- Stop IBM HTTP Server by running the following
What to do next
- If you are using IBM HTTP Server with WebSphere Application Server and did not configure the plug-in when you ran the install_ihs installer program, install and configure the WebSphere Application Server plug-in for IBM HTTP Server according to the instructions in the WebSphere Application Server for z/OS IBM Knowledge Center. If IBM HTTP Server is at Fix Pack 18.104.22.168 or later, you can use the WebSphere Application Server plug-in in the /usr/lpp/ihsa_zos/plugin directory instead of installing them separately with IBM Installation Manager.
- Create a JCL cataloged procedure to start the server instance. You must do this step if you are
using the administrative console to start and stop IBM HTTP
Server. For more information, see Using JCL procedures to start IBM HTTP Server on z/OS.Important: The PARM value in a JCL cataloged procedure that is limited to 100 characters. Since the PARM value contains the installation directory (&DIR), the total length might exceed the 100 character limit. Take the path name length into consideration when you choose the installation directory. If the installation directory path name is too long, it is possible to use a shorter named path in the JCL that is symbolically linked to the original installation directory path name.
- Edit the IBM HTTP Server configuration file,
httpd.conf, to meet your organization's needs. For more information about this
file and about supported Apache modules, see Configuring IBM HTTP Server.The following changes are typical ones that you can make to the configuration file:
- Edit the DocumentRoot directive to point to the web pages for your site.
- Enable SSL support by adding the following directives to the end of the
The Keyfile directive can instead specify an HFS file name by using the syntax of
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 Securing with SSL communications and Secure Sockets Layer (SSL) directives.
- Verify that mod_status module is enabled as shown in the following
If you want to restrict access to a specific IP address, uncomment the sample mod_access Require directive, but modify the IP argument to specify the proper IP address.
LoadModule status_module modules/mod_status.so <IfModule mod_status.c> ExtendedStatus On </IfModule> ... <IfModule mod_status.c> <Location /server-status> SetHandler server-status Require all denied # To allow access from a specific IP: # Require ip 192.168.1 </Location> </IfModule>
- You can install the web server to an HFS shared R/W by multiple hosts in a sysplex.Special configuration requirements exist for components of the web server that use AF_UNIX sockets. AF_UNIX sockets are not supported by an HFS that is shared R/W. So, configuration directives are used to place the AF_UNIX sockets on a filesystem that is 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 and you specify
-admin when you created the server instance, you can add support for the
administrative console after the initial installation.
- Run the
bin/enable_adminscript to set the permissions needed to modify the httpd.conf file from the administrative console.
- Add the control region user ID to the IBM HTTP Server
group by using SAF. See the following
CONNECT ASCR1 GROUP (WWWGROUP) OWNER (WWWGROUP)
- Create a cataloged JCL procedure to start and stop the server. For more information, see Using JCL procedures to start IBM HTTP Server on z/OS.
- Run the