trove/doc/source/install/apache-mod-wsgi.rst
wu.chunyang 44c3cdef5c Rename app.wsgi to app_wsgi.py
1. app.wsgi is a python script and should be end with py extension.
2. Generate trove-wsgi script which is needed by kolla to support
https and ipv6.
3. Ignore build directory in git
4. update docs

Change-Id: Ibbd6ecb8db25aa3a443d3f526f4cf6d418eb26f3
2022-08-25 11:10:33 +08:00

1.5 KiB

Installing API behind mod_wsgi

  1. Install the Apache Service:

    RHEL7/CentOS7:
      sudo yum install httpd mod_wsgi
    
    RHEL8/CentOS8:
      sudo dnf install httpd python3-mod_wsgi
    
    Fedora:
      sudo dnf install httpd mod_wsgi
    
    Debian/Ubuntu:
      sudo apt-get install apache2 libapache2-mod-wsgi-py3
  2. Copy etc/apache2/trove under the apache sites:

    Fedora/RHEL/CentOS:
      sudo cp etc/apache2/trove /etc/httpd/conf.d/trove-api.conf
    
    Debian/Ubuntu:
      sudo cp etc/apache2/trove /etc/apache2/sites-available/trove-api.conf
  3. Edit <apache-configuration-dir>/trove-api.conf according to installation and environment.

    • Modify the WSGIDaemonProcess directive to set the user and group values to appropriate user on your server.
    • Modify the WSGIScriptAlias directive to point to the trove/api/app_wsgi.py script.
    • Modify the Directory directive to set the path to the Trove API code.
    • Modify the ErrorLog and CustomLog to redirect the logs to the right directory.
  4. Enable the apache trove site and reload:

    Fedora/RHEL7/CentOS7:
      sudo systemctl reload httpd
    
    Debian/Ubuntu:
      sudo a2ensite trove-api
      sudo service apache2 reload