1.4 KiB
1.4 KiB
Installing API behind mod_wsgi
Install the Apache Service:
Fedora/RHEL/CentOS: sudo dnf install httpd python3-mod_wsgi Debian/Ubuntu: sudo apt install apache2 libapache2-mod-wsgi-py3Copy
etc/apache2/troveunder 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.confEdit
<apache-configuration-dir>/trove-api.confaccording to installation and environment.- Modify the
WSGIDaemonProcessdirective to set theuserandgroupvalues to appropriate user on your server. - Modify the
WSGIScriptAliasdirective to point to the trove/api/app_wsgi.py script. - Modify the
Directorydirective to set the path to the Trove API code. - Modify the
ErrorLog and CustomLogto redirect the logs to the right directory.
- Modify the
Enable the apache trove site and reload:
Fedora/RHEL/CentOS: sudo systemctl reload httpd Debian/Ubuntu: sudo a2ensite trove-api sudo systemctl reload apache2