From 7f2b6ebfc0d2e4d2b8c8e6d3208a2cae435d0eeb Mon Sep 17 00:00:00 2001 From: Amy Fong Date: Tue, 8 Apr 2014 11:52:38 -0400 Subject: Enable python-horizon to run from apache. - modify python-horizon to install files needed for horizon/apache - add apache configuration file (openstack-dashboard-apache.conf) to setup a virtual host running from port 80 to run the mod_wsgi/openstack-dashboard app - add horizon-apache and apache2 to controller task list - Note: local_settings.py differs from the one in examples in two ways: 1. LOCAL_PATH = "/usr/share/openstack-dashboard/openstack_dashboard/static" since the apache app runs as daemon, we neeed to specify a path where daemon has write permissions 2. configure python-horizon/apache to use memcached. (see CACHES) Signed-off-by: Amy Fong --- .../python-horizon/openstack-dashboard-apache.conf | 55 ++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 meta-openstack/recipes-devtools/python/python-horizon/openstack-dashboard-apache.conf (limited to 'meta-openstack/recipes-devtools/python/python-horizon/openstack-dashboard-apache.conf') diff --git a/meta-openstack/recipes-devtools/python/python-horizon/openstack-dashboard-apache.conf b/meta-openstack/recipes-devtools/python/python-horizon/openstack-dashboard-apache.conf new file mode 100644 index 0000000..5b77639 --- /dev/null +++ b/meta-openstack/recipes-devtools/python/python-horizon/openstack-dashboard-apache.conf @@ -0,0 +1,55 @@ +LoadModule wsgi_module /usr/lib64/apache2/modules/mod_wsgi.so + +# python 2.7.2 has a bug that causes fork run in sub interpreters to fail +# http://bugs.python.org/issue13156 +WSGIApplicationGroup %{GLOBAL} + + + ServerAdmin webmaster@localhost + WSGIScriptAlias / /usr/share/openstack-dashboard/openstack_dashboard/wsgi/django.wsgi + WSGIDaemonProcess horizon user=daemon group=daemon home=/usr/share/openstack-dashboard/openstack_dashboard/static + #WSGIProcessGroup openstack-dashboard + Alias /static /usr/share/openstack-dashboard/openstack_dashboard/static + + DocumentRoot /usr/share/apache2/default-site/htdocs + + + AllowOverride None + + + + + Order allow,deny + Allow from all + + = 2.3> + Require all granted + + + + Alias /static/horizon %PYTHON_SITEPACKAGES%/horizon/static/horizon + + + + Order allow,deny + Allow from all + + = 2.3> + Require all granted + + + + + + Order allow,deny + Allow from all + + = 2.3> + Require all granted + + + + ErrorLog /var/log/apache2/openstack-dashboard-error.log + LogLevel debug + CustomLog /var/log/apache2/openstack-dashboard-access.log combined + -- cgit v1.2.3-54-g00ecf