Editing the Apache conf/httpd.conf File

Configure your relay servers to run in the Sybase Unwired Platform environment, by editing the Apache conf/httpd.conf file.

Key tasks for running the relay server with Sybase Unwired Platform include:
  • Loading relay server client and server modules.
  • Creating a <location> section for the client module.
  • Creating a <location> section for the server module.
  • Adding maximum server and client values on the Linux machine.
    Note: If you modify values in conf/httpd.conf, also change the kernel parameters (for Relay Server 11.0.x on Apache server only).
  • Modifying the number of concurrent device users (or Web requests) supported in the production system.
  • Setting global environment variables.

To edit the Apache conf/httpd.conf file:

  1. Navigate to the Apache modules directory, and use a text editor to open the Apache conf/httpd.conf file.
  2. Add these lines to load the relay server client and server modules:
    LoadModule iarelayserver_client_module modules/mod_rs_ap_client.so
    LoadModule iarelayserver_server_module modules/mod_rs_ap_server.so

    The client and server modules are invoked using different URLs. The client module explicitly looks for the string iarelayserver in the URL path.

  3. Add these lines to create a <location> section for the client module:
    <LocationMatch /cli/iarelayserver/* >
         SetHandler iarelayserver-client-handler
    </LocationMatch>
  4. Add these lines to create a <location> section for the server module, which corresponds the the URL suffix you configured for relay server:
    <Location /srv/iarelayserver/* >
         SetHandler iarelayserver-server-handler
         RSConfigFile "/<apache-install>/modules/rs.config"
    </Location>

    The RSConfigFile directive specifies the location of the relay server configuration file, rs.config. The rs.config file must reside in the same directory where the rshost executable is deployed. For details about configuring this file, see Configuring a Relay Server in a Multinode Cluster.

  5. For Relay Server 11.0.x on Apache server only, set the kernel on the Linux machine.
    Guidelines:
    • Set the ServerLimit and MaxClient values to greater than or equal to the number of UltraLite device clients. To calculate your number of clients: (Number of UltraLite device clients) + (2 * Number of OE Backends).
    • The OE connections are considered clients from the Web server point of view. Each OE (backend) has an Up channel and a Down Channel (counting as two clients).
    • For example, if you have 500 concurrent UltraLite device clients and two backends, you would configure at least 504 MaxClients [500 + (2 * 2)]. For better performance and allow for margin, you might want to double that and configure MaxClients at 1000.
    1. Add the following lines to the file, and either use the default values, or change the values using the guidelines.
      ServerLimit 256
      MaxClient 256
    2. If you changed the ServerLimit and MaxClient default values, you will need to increase the semaphore sets. You may also want to configure additional kernel parameters on the Linux machine.
      Run ipcs -l to check the kernel limits value. You can use this information to modify kernel limits, as shown in the example below. For detailed information see Setting the Kernel Parameters.
      ------ Shared Memory Limits --------
      max number of segments = 4096
      max seg size (kbytes) = 4194303
      max total shared memory (kbytes) = 1073741824
      min seg size (bytes) = 1
      
      ------ Semaphore Limits --------
      max number of arrays = 640
      max semaphores per array = 250
      max semaphores system wide = 160000
      max ops per semop call = 32
      semaphore max value = 32767
      
      ------ Messages: Limits --------
      max queues system wide = 16
      max size of message (bytes) = 65536
      default max size of queue (bytes) = 65536
      
  6. By default , Relay Server on Linux is configured for 100 concurrent device users (or Web requests) in the production system. If you have more than this, modify the number to an appropriate value in this section:
    #
    # MaxKeepAliveRequests: The maximum number of requests to allow
    # during a persistent connection. Set to 0 to allow an unlimited amount.
    # We recommend you leave this number high, for maximum performance.
    #
    MaxKeepAliveRequests 100