From 1bdedc29b385767409c08f5bc7b6f14ff5244570 Mon Sep 17 00:00:00 2001 From: Roland Mas Date: Mon, 5 Nov 2012 10:27:48 +0100 Subject: [PATCH] Simplify shipping of the Apache config files Rewritten-From: 5f0e437a427456e45575e5605756852f8ba501e7 --- .../openstack-dashboard-apache-ssl.conf | 40 ---------- .../debian/openstack-dashboard-apache.install | 1 + .../debian/patches/apache-config-file.patch | 76 +++++++++++++++---- xenial/debian/rules | 4 - 4 files changed, 63 insertions(+), 58 deletions(-) delete mode 100644 xenial/debian/openstack-dashboard-apache-ssl.conf diff --git a/xenial/debian/openstack-dashboard-apache-ssl.conf b/xenial/debian/openstack-dashboard-apache-ssl.conf deleted file mode 100644 index c9927ce..0000000 --- a/xenial/debian/openstack-dashboard-apache-ssl.conf +++ /dev/null @@ -1,40 +0,0 @@ - - ServerAdmin webmaster@localhost - SSLEngine on - SSLCertificateFile /etc/ssl/certs/ssl-cert-snakeoil.pem - SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key - BrowserMatch "MSIE [2-6]" \ - nokeepalive ssl-unclean-shutdown \ - downgrade-1.0 force-response-1.0 - BrowserMatch "MSIE [17-9]" ssl-unclean-shutdown - - WSGIScriptAlias / /usr/share/openstack-dashboard/openstack_dashboard/wsgi/django.wsgi - WSGIDaemonProcess horizon user=www-data group=www-data - #WSGIProcessGroup openstack-dashboard - Alias /static /usr/share/openstack-dashboard/openstack_dashboard/static - - DocumentRoot /var/www - - - AllowOverride None - - - - Order allow,deny - Allow from all - - - - Order allow,deny - Allow from all - - - - Order allow,deny - Allow from all - - - ErrorLog ${APACHE_LOG_DIR}/error.log - LogLevel warn - CustomLog ${APACHE_LOG_DIR}/access.log combined - diff --git a/xenial/debian/openstack-dashboard-apache.install b/xenial/debian/openstack-dashboard-apache.install index 8ba5ad2..3067864 100644 --- a/xenial/debian/openstack-dashboard-apache.install +++ b/xenial/debian/openstack-dashboard-apache.install @@ -1 +1,2 @@ etc/apache2/openstack-dashboard /etc/apache2/sites-available +etc/apache2/openstack-dashboard-ssl /etc/apache2/sites-available diff --git a/xenial/debian/patches/apache-config-file.patch b/xenial/debian/patches/apache-config-file.patch index 4436ee7..16d43ba 100644 --- a/xenial/debian/patches/apache-config-file.patch +++ b/xenial/debian/patches/apache-config-file.patch @@ -2,36 +2,84 @@ Index: horizon/etc/apache2/openstack-dashboard =================================================================== --- /dev/null +++ horizon/etc/apache2/openstack-dashboard -@@ -0,0 +1,32 @@ -+NameVirtualHost *:8080 -+Listen 8080 -+ -+ +@@ -0,0 +1,35 @@ ++ ++ ServerAdmin webmaster@localhost + WSGIScriptAlias / /usr/share/openstack-dashboard/openstack_dashboard/wsgi/django.wsgi -+ WSGIDaemonProcess openstack-dashboard user=horizon group=horizon -+ WSGIProcessGroup openstack-dashboard ++ WSGIDaemonProcess horizon user=www-data group=www-data ++ #WSGIProcessGroup openstack-dashboard ++ Alias /static /usr/share/openstack-dashboard/openstack_dashboard/static ++ ++ DocumentRoot /var/www + + -+ AllowOverride None ++ AllowOverride None + + + -+ Order allow,deny -+ Allow from all ++ Order allow,deny ++ Allow from all + + + Alias /static/horizon /usr/share/pyshared/horizon/static/horizon + + -+ Order allow,deny -+ Allow from all ++ Order allow,deny ++ Allow from all ++ ++ ++ #Alias /static /usr/share/openstack-dashboard/openstack_dashboard/static ++ ++ ++ Order allow,deny ++ Allow from all + ++ ErrorLog ${APACHE_LOG_DIR}/error.log ++ LogLevel warn ++ CustomLog ${APACHE_LOG_DIR}/access.log combined ++ +Index: horizon/etc/apache2/openstack-dashboard-ssl +=================================================================== +--- /dev/null ++++ horizon/etc/apache2/openstack-dashboard-ssl +@@ -0,0 +1,40 @@ ++ ++ ServerAdmin webmaster@localhost ++ SSLEngine on ++ SSLCertificateFile /etc/ssl/certs/ssl-cert-snakeoil.pem ++ SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key ++ BrowserMatch "MSIE [2-6]" \ ++ nokeepalive ssl-unclean-shutdown \ ++ downgrade-1.0 force-response-1.0 ++ BrowserMatch "MSIE [17-9]" ssl-unclean-shutdown + ++ WSGIScriptAlias / /usr/share/openstack-dashboard/openstack_dashboard/wsgi/django.wsgi ++ WSGIDaemonProcess horizon user=www-data group=www-data ++ #WSGIProcessGroup openstack-dashboard + Alias /static /usr/share/openstack-dashboard/openstack_dashboard/static + ++ DocumentRoot /var/www ++ ++ ++ AllowOverride None ++ ++ ++ ++ Order allow,deny ++ Allow from all ++ ++ ++ ++ Order allow,deny ++ Allow from all ++ ++ + -+ Order allow,deny -+ Allow from all ++ Order allow,deny ++ Allow from all + + ++ ErrorLog ${APACHE_LOG_DIR}/error.log ++ LogLevel warn ++ CustomLog ${APACHE_LOG_DIR}/access.log combined + diff --git a/xenial/debian/rules b/xenial/debian/rules index 73c6b04..099ecc1 100755 --- a/xenial/debian/rules +++ b/xenial/debian/rules @@ -41,10 +41,6 @@ override_dh_auto_install: chmod 644 $(CURDIR)/debian/tmp/usr/share/openstack-dashboard/openstack_dashboard/static/dashboard/css/*.css chmod 644 $(CURDIR)/debian/tmp/usr/share/openstack-dashboard/openstack_dashboard/static/dashboard/manifest.json - # openstack-dashboard-apache - install -D -m 0644 $(CURDIR)/debian/openstack-dashboard-apache.conf $(CURDIR)/debian/tmp/etc/apache2/sites-available/openstack-dashboard - install -D -m 0644 $(CURDIR)/debian/openstack-dashboard-apache-ssl.conf $(CURDIR)/debian/tmp/etc/apache2/sites-available/openstack-dashboard-ssl - override_dh_install: dh_install rm -r $(CURDIR)/debian/openstack-dashboard/usr/share/openstack-dashboard/openstack_dashboard/static/dashboard/js -- 2.45.2