Home

 

Running multiple instances of IHS from a single install

 

+

Search Tips   |   Advanced Search

 

It is seldom necessary to run multiple instances, as features like virtual hosts allow a single instance to efficiently serve many sites, but it some cases it is necessary. If we need to securely administer your sites by different administrators, for example, run separate instances that each use their own configuration files.

This topic is primarily for AIX, HP-UX, Linux, Solaris, and Windows operating systems. On the z/OS platform, the install_ihs command creates a separate for each instance without creating another copy of the product. When you follow the examples, change "this_instance" to a unique name for each instance.

Before configuring multiple instances, consider if wer problem can be solved by using virtual hosts and/or having IHS listen on multiple addresses and ports. The advantage of a single instance is that it uses less resources to serve the same requests as multiple instances.

  1. Create a separate main configuration file, normally the httpd.conf file, for each instance.

    To reduce duplication, store common directives in common files and import these into the separate, main configuration files with the Include directive. We'll call the configuration file conf/this_instance.conf for the rest of these steps. Here is a simple example of a configuration file for an instance:

    Listen 10.0.0.1:80
    PidFile instance1/httpd.pid
    ErrorLog instance1/error.log
    CustomLog instance1/access.log common
    # Other directives that make this instance behave uniquely
    Include conf/common.conf

    A real configuration file would have more directives in it to make this instance behave differently than the other instances.

  2. Configure the port settings in the configuration files.

    You cannot use a combination of listen port and listen IP address for more than one instance. Check the Listen directives in each configuration file, and verify that they are unique. See information on the Listen directive for Apache HTTP Server for more information.

  3. Configure settings for logging and other special files.

    Any files that are normally stored in the install_root/logs directory cannot be shared between instances. Each instance must have unique values for the following directives:

    PidFile

    Applicable to all configurations.

    ScriptSock

    Applicable to non-Windows configurations with mod_cgid enabled.

    ErrorLog

    Applicable to all configurations.

    CustomLog or TransferLog

    Applicable to all configurations.

    SSLCachePortFilename

    Applicable to all non-Windows configurations with SSL enabled.

    SSLCachePath

    Applicable when all of the conditions below are true:

    • Platform is not Windows.
    • SSL is enabled.
    • SSLCacheDisable directive is not configured.

    • bin/apachectl has been modified to specify a different -d flag, or bin/apachectl is launched with an explicit -d flag.

    • The specified by the -d flag does not contain the file bin/sidd.
    See the information on the SSLCachePath directive for Apache HTTP Server.

    Other optional directives that specify a file path, like logging or tracing.

  4. AIX: Windows: Ensure that only one IHS instance has the fast response cache accelerator (FRCA), or AFPA, enabled.

  5. Start or stop the IHS server instance.

    • AIX: HP-UX: Linux: Solaris: Use these commands to start and stop IHS:

      # cd /install_dir
      # bin/apachectl -k start -f conf/this_instance.conf
      # bin/apachectl -k stop  -f conf/this_instance.conf
      Alternatively, you can create a copy of apachectl for each instance, and update the commands in each copy to include "-f conf/this_instance.conf".

    • Windows: Use these commands to setup a new instance:

      cd \install_dir
      bin\Apache.exe -f conf/this_instance.conf -k install -n IHS-this_instance
      Choose one of these commands to start and stop IHS:

      • Use this command:

        net start IHS-this_instance

      • Use this command:

        cd \install_dir
        bin\Apache.exe -k install -n IHS-this_instance.conf
        

      • Find IHS6-this_instance in the Services interface for Microsoft Windows.

    See the topic on starting and stopping IHS for more information.


 

Related tasks

Install IHS

Starting and stopping IHS

 

Related reference