trove/doc/source/install/apache-mod-wsgi.rst

53 lines
1.5 KiB
ReStructuredText
Raw Normal View History

..
Except where otherwise noted, this document is licensed under Creative
Commons Attribution 3.0 License. You can view the license at:
https://creativecommons.org/licenses/by/3.0/
Installing API behind mod_wsgi
==============================
#. Install the Apache Service::
Fixes "a2ensite" command arg and adds mod_wsgi package installation Fixes "a2ensite" command arg ----------------------------- "sudo a2ensite trove" in this file should be "sudo a2ensite trove-api" because the following error will occur while following this manual's instructions:: $ sudo a2ensite trove ERROR: Site trove does not exist! $ sudo a2ensite trove-api Enabling site trove-api. To activate the new configuration, you need to run: systemctl reload apache2 Here are steps to reproduce the error:: $ sudo apt-get install apache2 libapache2-mod-wsgi-py3 $ git clone https://opendev.org/openstack/trove.git; cd trove $ sudo cp etc/apache2/trove /etc/apache2/sites-available/trove-api.conf $ sudo a2ensite trove ERROR: Site trove does not exist! I have tested on Ubuntu 18.04.4 LTS:: $ uname -a Linux bionic 4.15.0-91-generic #92-Ubuntu SMP Fri Feb 28 11:09:48 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux $ cat /etc/os-release NAME="Ubuntu" VERSION="18.04.4 LTS (Bionic Beaver)" ID=ubuntu ID_LIKE=debian PRETTY_NAME="Ubuntu 18.04.4 LTS" VERSION_ID="18.04" HOME_URL="https://www.ubuntu.com/" SUPPORT_URL="https://help.ubuntu.com/" BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/" PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy" VERSION_CODENAME=bionic UBUNTU_CODENAME=bionic Adds mod_wsgi package installation ----------------------------------- I adds mod_wsgi package installation next to apache package installation because I don't find its installation through the docs in spite of mod_wsgi's importance for trove-api. I also updates description about following parts: * RHEL8 and CentOS8 lines are added. * Fedora21 and Fedora22, which are not supported by Fedora Project, lines are merged to "Fedora". Change-Id: I3dfc894cc001529d60048d53e206251a41d546c0 Task: 39116 Story: 2007446 Signed-off-by: Hirotaka Wakabayashi <hiwkby@yahoo.com>
2020-03-22 11:03:57 +00:00
RHEL7/CentOS7:
sudo yum install httpd mod_wsgi
Fixes "a2ensite" command arg and adds mod_wsgi package installation Fixes "a2ensite" command arg ----------------------------- "sudo a2ensite trove" in this file should be "sudo a2ensite trove-api" because the following error will occur while following this manual's instructions:: $ sudo a2ensite trove ERROR: Site trove does not exist! $ sudo a2ensite trove-api Enabling site trove-api. To activate the new configuration, you need to run: systemctl reload apache2 Here are steps to reproduce the error:: $ sudo apt-get install apache2 libapache2-mod-wsgi-py3 $ git clone https://opendev.org/openstack/trove.git; cd trove $ sudo cp etc/apache2/trove /etc/apache2/sites-available/trove-api.conf $ sudo a2ensite trove ERROR: Site trove does not exist! I have tested on Ubuntu 18.04.4 LTS:: $ uname -a Linux bionic 4.15.0-91-generic #92-Ubuntu SMP Fri Feb 28 11:09:48 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux $ cat /etc/os-release NAME="Ubuntu" VERSION="18.04.4 LTS (Bionic Beaver)" ID=ubuntu ID_LIKE=debian PRETTY_NAME="Ubuntu 18.04.4 LTS" VERSION_ID="18.04" HOME_URL="https://www.ubuntu.com/" SUPPORT_URL="https://help.ubuntu.com/" BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/" PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy" VERSION_CODENAME=bionic UBUNTU_CODENAME=bionic Adds mod_wsgi package installation ----------------------------------- I adds mod_wsgi package installation next to apache package installation because I don't find its installation through the docs in spite of mod_wsgi's importance for trove-api. I also updates description about following parts: * RHEL8 and CentOS8 lines are added. * Fedora21 and Fedora22, which are not supported by Fedora Project, lines are merged to "Fedora". Change-Id: I3dfc894cc001529d60048d53e206251a41d546c0 Task: 39116 Story: 2007446 Signed-off-by: Hirotaka Wakabayashi <hiwkby@yahoo.com>
2020-03-22 11:03:57 +00:00
RHEL8/CentOS8:
sudo dnf install httpd python3-mod_wsgi
Fedora:
sudo dnf install httpd mod_wsgi
Debian/Ubuntu:
Fixes "a2ensite" command arg and adds mod_wsgi package installation Fixes "a2ensite" command arg ----------------------------- "sudo a2ensite trove" in this file should be "sudo a2ensite trove-api" because the following error will occur while following this manual's instructions:: $ sudo a2ensite trove ERROR: Site trove does not exist! $ sudo a2ensite trove-api Enabling site trove-api. To activate the new configuration, you need to run: systemctl reload apache2 Here are steps to reproduce the error:: $ sudo apt-get install apache2 libapache2-mod-wsgi-py3 $ git clone https://opendev.org/openstack/trove.git; cd trove $ sudo cp etc/apache2/trove /etc/apache2/sites-available/trove-api.conf $ sudo a2ensite trove ERROR: Site trove does not exist! I have tested on Ubuntu 18.04.4 LTS:: $ uname -a Linux bionic 4.15.0-91-generic #92-Ubuntu SMP Fri Feb 28 11:09:48 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux $ cat /etc/os-release NAME="Ubuntu" VERSION="18.04.4 LTS (Bionic Beaver)" ID=ubuntu ID_LIKE=debian PRETTY_NAME="Ubuntu 18.04.4 LTS" VERSION_ID="18.04" HOME_URL="https://www.ubuntu.com/" SUPPORT_URL="https://help.ubuntu.com/" BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/" PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy" VERSION_CODENAME=bionic UBUNTU_CODENAME=bionic Adds mod_wsgi package installation ----------------------------------- I adds mod_wsgi package installation next to apache package installation because I don't find its installation through the docs in spite of mod_wsgi's importance for trove-api. I also updates description about following parts: * RHEL8 and CentOS8 lines are added. * Fedora21 and Fedora22, which are not supported by Fedora Project, lines are merged to "Fedora". Change-Id: I3dfc894cc001529d60048d53e206251a41d546c0 Task: 39116 Story: 2007446 Signed-off-by: Hirotaka Wakabayashi <hiwkby@yahoo.com>
2020-03-22 11:03:57 +00:00
sudo apt-get install apache2 libapache2-mod-wsgi-py3
#. Copy ``etc/apache2/trove`` under the apache sites::
Fixes "a2ensite" command arg and adds mod_wsgi package installation Fixes "a2ensite" command arg ----------------------------- "sudo a2ensite trove" in this file should be "sudo a2ensite trove-api" because the following error will occur while following this manual's instructions:: $ sudo a2ensite trove ERROR: Site trove does not exist! $ sudo a2ensite trove-api Enabling site trove-api. To activate the new configuration, you need to run: systemctl reload apache2 Here are steps to reproduce the error:: $ sudo apt-get install apache2 libapache2-mod-wsgi-py3 $ git clone https://opendev.org/openstack/trove.git; cd trove $ sudo cp etc/apache2/trove /etc/apache2/sites-available/trove-api.conf $ sudo a2ensite trove ERROR: Site trove does not exist! I have tested on Ubuntu 18.04.4 LTS:: $ uname -a Linux bionic 4.15.0-91-generic #92-Ubuntu SMP Fri Feb 28 11:09:48 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux $ cat /etc/os-release NAME="Ubuntu" VERSION="18.04.4 LTS (Bionic Beaver)" ID=ubuntu ID_LIKE=debian PRETTY_NAME="Ubuntu 18.04.4 LTS" VERSION_ID="18.04" HOME_URL="https://www.ubuntu.com/" SUPPORT_URL="https://help.ubuntu.com/" BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/" PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy" VERSION_CODENAME=bionic UBUNTU_CODENAME=bionic Adds mod_wsgi package installation ----------------------------------- I adds mod_wsgi package installation next to apache package installation because I don't find its installation through the docs in spite of mod_wsgi's importance for trove-api. I also updates description about following parts: * RHEL8 and CentOS8 lines are added. * Fedora21 and Fedora22, which are not supported by Fedora Project, lines are merged to "Fedora". Change-Id: I3dfc894cc001529d60048d53e206251a41d546c0 Task: 39116 Story: 2007446 Signed-off-by: Hirotaka Wakabayashi <hiwkby@yahoo.com>
2020-03-22 11:03:57 +00:00
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
#. 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 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.
#. Enable the apache trove site and reload::
Fedora/RHEL7/CentOS7:
sudo systemctl reload httpd
Debian/Ubuntu:
Fixes "a2ensite" command arg and adds mod_wsgi package installation Fixes "a2ensite" command arg ----------------------------- "sudo a2ensite trove" in this file should be "sudo a2ensite trove-api" because the following error will occur while following this manual's instructions:: $ sudo a2ensite trove ERROR: Site trove does not exist! $ sudo a2ensite trove-api Enabling site trove-api. To activate the new configuration, you need to run: systemctl reload apache2 Here are steps to reproduce the error:: $ sudo apt-get install apache2 libapache2-mod-wsgi-py3 $ git clone https://opendev.org/openstack/trove.git; cd trove $ sudo cp etc/apache2/trove /etc/apache2/sites-available/trove-api.conf $ sudo a2ensite trove ERROR: Site trove does not exist! I have tested on Ubuntu 18.04.4 LTS:: $ uname -a Linux bionic 4.15.0-91-generic #92-Ubuntu SMP Fri Feb 28 11:09:48 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux $ cat /etc/os-release NAME="Ubuntu" VERSION="18.04.4 LTS (Bionic Beaver)" ID=ubuntu ID_LIKE=debian PRETTY_NAME="Ubuntu 18.04.4 LTS" VERSION_ID="18.04" HOME_URL="https://www.ubuntu.com/" SUPPORT_URL="https://help.ubuntu.com/" BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/" PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy" VERSION_CODENAME=bionic UBUNTU_CODENAME=bionic Adds mod_wsgi package installation ----------------------------------- I adds mod_wsgi package installation next to apache package installation because I don't find its installation through the docs in spite of mod_wsgi's importance for trove-api. I also updates description about following parts: * RHEL8 and CentOS8 lines are added. * Fedora21 and Fedora22, which are not supported by Fedora Project, lines are merged to "Fedora". Change-Id: I3dfc894cc001529d60048d53e206251a41d546c0 Task: 39116 Story: 2007446 Signed-off-by: Hirotaka Wakabayashi <hiwkby@yahoo.com>
2020-03-22 11:03:57 +00:00
sudo a2ensite trove-api
sudo service apache2 reload