diff options
| author | Amy Fong <amy.fong@windriver.com> | 2014-04-08 11:52:38 -0400 |
|---|---|---|
| committer | Bruce Ashfield <bruce.ashfield@windriver.com> | 2014-04-10 14:38:56 -0400 |
| commit | 7f2b6ebfc0d2e4d2b8c8e6d3208a2cae435d0eeb (patch) | |
| tree | 48a42db440207178364a9f9d9a38e1a073166d42 /meta-openstack/recipes-devtools/python/python-horizon/openstack-dashboard-apache.conf | |
| parent | f72e9d29b18bb4c6ca076f1e729b6572e4928d4d (diff) | |
| download | meta-cloud-services-7f2b6ebfc0d2e4d2b8c8e6d3208a2cae435d0eeb.tar.gz | |
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 <amy.fong@windriver.com>
Diffstat (limited to 'meta-openstack/recipes-devtools/python/python-horizon/openstack-dashboard-apache.conf')
| -rw-r--r-- | meta-openstack/recipes-devtools/python/python-horizon/openstack-dashboard-apache.conf | 55 |
1 files changed, 55 insertions, 0 deletions
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 @@ | |||
| 1 | LoadModule wsgi_module /usr/lib64/apache2/modules/mod_wsgi.so | ||
| 2 | |||
| 3 | # python 2.7.2 has a bug that causes fork run in sub interpreters to fail | ||
| 4 | # http://bugs.python.org/issue13156 | ||
| 5 | WSGIApplicationGroup %{GLOBAL} | ||
| 6 | |||
| 7 | <VirtualHost *:80> | ||
| 8 | ServerAdmin webmaster@localhost | ||
| 9 | WSGIScriptAlias / /usr/share/openstack-dashboard/openstack_dashboard/wsgi/django.wsgi | ||
| 10 | WSGIDaemonProcess horizon user=daemon group=daemon home=/usr/share/openstack-dashboard/openstack_dashboard/static | ||
| 11 | #WSGIProcessGroup openstack-dashboard | ||
| 12 | Alias /static /usr/share/openstack-dashboard/openstack_dashboard/static | ||
| 13 | |||
| 14 | DocumentRoot /usr/share/apache2/default-site/htdocs | ||
| 15 | |||
| 16 | <Directory /> | ||
| 17 | AllowOverride None | ||
| 18 | </Directory> | ||
| 19 | |||
| 20 | <Directory /usr/share/openstack-dashboard/openstack_dashboard/wsgi/> | ||
| 21 | <IfVersion < 2.3> | ||
| 22 | Order allow,deny | ||
| 23 | Allow from all | ||
| 24 | </IfVersion> | ||
| 25 | <IfVersion >= 2.3> | ||
| 26 | Require all granted | ||
| 27 | </IfVersion> | ||
| 28 | </Directory> | ||
| 29 | |||
| 30 | Alias /static/horizon %PYTHON_SITEPACKAGES%/horizon/static/horizon | ||
| 31 | |||
| 32 | <Directory %PYTHON_SITEPACKAGES%/horizon/static/horizon> | ||
| 33 | <IfVersion < 2.3> | ||
| 34 | Order allow,deny | ||
| 35 | Allow from all | ||
| 36 | </IfVersion> | ||
| 37 | <IfVersion >= 2.3> | ||
| 38 | Require all granted | ||
| 39 | </IfVersion> | ||
| 40 | </Directory> | ||
| 41 | |||
| 42 | <Directory /usr/share/openstack-dashboard/openstack_dashboard/static/> | ||
| 43 | <IfVersion < 2.3> | ||
| 44 | Order allow,deny | ||
| 45 | Allow from all | ||
| 46 | </IfVersion> | ||
| 47 | <IfVersion >= 2.3> | ||
| 48 | Require all granted | ||
| 49 | </IfVersion> | ||
| 50 | </Directory> | ||
| 51 | |||
| 52 | ErrorLog /var/log/apache2/openstack-dashboard-error.log | ||
| 53 | LogLevel debug | ||
| 54 | CustomLog /var/log/apache2/openstack-dashboard-access.log combined | ||
| 55 | </VirtualHost> | ||
