Configure the Apache Web server

  1. Use the example configuration files to configure your Web server for the Evergreen catalog, web staff client, Web services, and administration interfaces. Issue the following commands as the root Linux account:

    cp Open-ILS/examples/apache_24/eg_24.conf       /etc/apache2/sites-available/eg.conf
    cp Open-ILS/examples/apache_24/eg_vhost_24.conf /etc/apache2/eg_vhost.conf
    cp Open-ILS/examples/apache_24/eg_startup       /etc/apache2/
    # Now set up SSL
    mkdir /etc/apache2/ssl
    cd /etc/apache2/ssl
  2. The openssl command cuts a new SSL key for your Apache server. For a production server, you should purchase a signed SSL certificate, but you can just use a self-signed certificate and accept the warnings in the and browser during testing and development. Create an SSL key for the Apache server by issuing the following command as the root Linux account:

    openssl req -new -x509 -days 365 -nodes -out server.crt -keyout server.key
  3. As the root Linux account, edit the eg.conf file that you copied into place.

    1. To enable access to the offline upload / execute interface from any workstation on any network, make the following change (and note that you must secure this for a production instance):

      • Replace Require host with Require all granted
  4. Change the user for the Apache server.

    • As the root Linux account, edit /etc/apache2/envvars. Change export APACHE_RUN_USER=www-data to export APACHE_RUN_USER=opensrf.
  5. As the root Linux account, configure Apache with KeepAlive settings appropriate for Evergreen. Higher values can improve the performance of a single client by allowing multiple requests to be sent over the same TCP connection, but increase the risk of using up all available Apache child processes and memory.

    • Edit /etc/apache2/apache2.conf.

      1. Change KeepAliveTimeout to 1.
      2. Change MaxKeepAliveRequests to 100.
  6. As the root Linux account, configure the prefork module to start and keep enough Apache servers available to provide quick responses to clients without running out of memory. The following settings are a good starting point for a site that exposes the default Evergreen catalogue to the web:


    <IfModule mpm_prefork_module>
       StartServers            15
       MinSpareServers          5
       MaxSpareServers         15
       MaxRequestWorkers       75
       MaxConnectionsPerChild 500

  7. As the root user, enable the mpm_prefork module:

    a2dismod mpm_event
    a2enmod mpm_prefork
  8. As the root Linux account, enable the Evergreen site:

    a2dissite 000-default  # OPTIONAL: disable the default site (the "It Works" page)
    a2ensite eg.conf
  9. As the root Linux account, enable Apache to write to the lock directory; this is currently necessary because Apache is running as the opensrf user:

    chown opensrf /var/lock/apache2

Learn more about additional Apache options in the following sections: