From 91a8faac316b93d165f3f316d4293ff454da1b67 Mon Sep 17 00:00:00 2001 From: Ronald van Zantvoort Date: Tue, 31 May 2016 09:07:37 +0200 Subject: [PATCH] SysVM various fixes to previous refactorings * make CORS include a regular glob-matched one * fix NameVirtualHost in CsApp.py as well * even moar cleanups --- systemvm/patches/debian/config/etc/apache2/vhost.template | 4 ++-- systemvm/patches/debian/config/etc/init.d/cloud-early-config | 3 +++ systemvm/patches/debian/config/opt/cloud/bin/cs/CsApp.py | 1 + 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/systemvm/patches/debian/config/etc/apache2/vhost.template b/systemvm/patches/debian/config/etc/apache2/vhost.template index 24d8d6056f2..043a286680d 100644 --- a/systemvm/patches/debian/config/etc/apache2/vhost.template +++ b/systemvm/patches/debian/config/etc/apache2/vhost.template @@ -83,8 +83,8 @@ Allow from 127.0.0.0/255.0.0.0 ::1/128 - # Include CORS configuration if set - IncludeOptional /etc/apache2/cors.conf + # Include CORS configuration **IF SET** + Include /etc/apache2/[cC][oO][rR][sS].conf # SSL Engine Switch: # Enable/Disable SSL for this virtual host. diff --git a/systemvm/patches/debian/config/etc/init.d/cloud-early-config b/systemvm/patches/debian/config/etc/init.d/cloud-early-config index 2103065c67a..bc26766aa21 100755 --- a/systemvm/patches/debian/config/etc/init.d/cloud-early-config +++ b/systemvm/patches/debian/config/etc/init.d/cloud-early-config @@ -814,8 +814,11 @@ clean_ipalias_config() { rm -f /etc/apache2/sites-enabled/ipAlias* rm -f /etc/apache2/conf.d/vhost*.conf rm -f /etc/apache2/ports.conf + rm -f /etc/apache2/vhostexample.conf rm -f /etc/apache2/sites-available/default rm -f /etc/apache2/sites-available/default-ssl + rm -f /etc/apache2/sites-enabled/default + rm -f /etc/apache2/sites-enabled/default-ssl # New rm -f /etc/apache2/sites-enabled/vhost-*.conf diff --git a/systemvm/patches/debian/config/opt/cloud/bin/cs/CsApp.py b/systemvm/patches/debian/config/opt/cloud/bin/cs/CsApp.py index 496a0e7876a..9762e04875a 100755 --- a/systemvm/patches/debian/config/opt/cloud/bin/cs/CsApp.py +++ b/systemvm/patches/debian/config/opt/cloud/bin/cs/CsApp.py @@ -49,6 +49,7 @@ class CsApache(CsApp): file.search("", "\t" % (self.ip)) file.search("Listen .*:80", "Listen %s:80" % (self.ip)) file.search("Listen .*:443", "Listen %s:443" % (self.ip)) + file.search("NameVirtualHost .*:80", "NameVirtualHost %s:80" % (self.ip)) file.search("ServerName.*", "\tServerName %s.%s" % (self.config.cl.get_type(), self.config.get_domain())) if file.is_changed(): file.commit()