Commit Graph

3 Commits

Author SHA1 Message Date
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
Hirotaka Wakabayashi
2f7f2c743b Fixes the following syntax error of etc/apache2/trove apache conf
$ apache2ctl configtest
AH00526: Syntax error on line 16 of /etc/apache2/sites-enabled/trove-api.conf:
Invalid command 'through', perhaps misspelled or defined by a module not included in the server configuration
Action 'configtest' failed.
The Apache error log may have more information.

I refere the manual to configure my trove env.
https://docs.openstack.org/trove/latest/install/apache-mod-wsgi.html

Here are three steps to reproduce the error.

Step1. Install apache2 and mod_wsgi
-----------------------------------
$ sudo apt-get install apache2 libapache2-mod-wsgi-py3

Step2. Git clone and Configure apache
-------------------------------------
$ 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 files this in https://bugs.launchpad.net/trove/+bug/1867811

$ sudo a2ensite trove-api
Enabling site trove-api.
To activate the new configuration, you need to run:
  systemctl reload apache2

Step3. Syntax error happens
----------------------------
Before starting apache2, Add "stack" user and mkdir "/var/log/httpd" directory.
$ sudo useradd -s /bin/bash -d /opt/stack -m stack
$ sudo mkdir -p /var/log/httpd

$ apache2ctl configtest
AH00526: Syntax error on line 16 of /etc/apache2/sites-enabled/trove-api.conf:
Invalid command 'through', perhaps misspelled or defined by a module not included in the server configuration
pAction 'configtest' failed.
The Apache error log may have more information.

$ apache2ctl configtest
AH00526: Syntax error on line 16 of /etc/apache2/sites-enabled/trove-api.conf:
Invalid command 'through', perhaps misspelled or defined by a module not included in the server configuration
Action 'configtest' failed.
The Apache error log may have more information.

$ sudo vi /etc/apache2/sites-enabled/trove-api.conf
$ diff  /etc/apache2/sites-enabled/trove-api.conf /etc/apache2/sites-enabled/trove-api.conf.orig
16c16
< # through mod_wsgi
---
> through mod_wsgi

$ apache2ctl configtest
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message
Syntax OK

I have tested on Ubuntu 18.04.4 LTS.

$ uname -a
Linux ubuntu-bionic 4.15.0-76-generic #86-Ubuntu SMP Fri Jan 17 17:24:28 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

Signed-off-by: Hirotaka Wakabayashi <hiwkby@yahoo.com>
Change-Id: Ia010941fd9fde2036672f6e6ae8ac488d63c1d4a
2020-03-19 00:50:15 +00:00
Amrith Kumar
20d51467c7 enable trove-api behind mod-wsgi
This change enables behind mod-wsgi as part of the community pike goal
goal-deploy-api-in-wsgi.

The change includes:

    - the wsgi script files to run trove api under apache
    - updates to the devstack plugin
    - a basic deploy doc which explains this change

Change-Id: Icdd39b47a1be426e87a5d09f9e9d567af1974a9c
Depends-On: I3d6f6649430ee40879de15fee0b215dc32e8b666
Closes-Bug: #1681478
2017-04-25 06:54:29 -04:00