12.3. Running Pegasus Service under Apache HTTPD

Prerequisites Apache HTTPD, mod_ssl, and mod_wsgi to be installed.

To run pegasus-service under Apache HTTPD

  1. Copy file share/pegasus/service/pegasus-service.wsgi to some other directory. We will refer to this directory as <WSGI_FILE_DIR>.

    Configure pegasus service by setting the AUTHENTICATION, PROCESS_SWITCHING, and/or ADMIN_USERS properties in the <WSGI_FILE_DIR>/pegasus-service.wsgi file as desired.

  2. Copy file share/pegasus/service/pegasus-service-httpd.conf to your Apache conf directory.

    1. Replace PEGASUS_PYTHON_EXTERNALS with absolute path to pegasus python externals directory. Execute pegasus-config --python-externals to get this path

    2. Replace HOSTNAME with the hostname on which the server should listen for requests.

    3. Replace DOCUMENT_ROOT with <WSGI_FILE_DIR>

    4. Replace USER_NAME with the username as which the WSGIDaemonProcess should start

    5. Replace GROUP_NAME with the groupname as which the WSGIDaemonProcess should start

    6. Replace PATH_TO_PEGASUS_SERVICE_WSGI_FILE with <WSGI_FILE_DIR>/pegasus-service.wsgi

    7. Replace PATH_TO_SSL_CERT with absolute location of your SSL certificate file

    8. Replace PATH_TO_SSL_KEY with absolute location of your SSL private key file

For additional mod_wsgi configuration refer to https://code.google.com/p/modwsgi/wiki/ConfigurationDirectives