SysVM various fixes to previous refactorings

* make CORS include a regular glob-matched one
* fix NameVirtualHost in CsApp.py as well
* even moar cleanups
This commit is contained in:
Ronald van Zantvoort 2016-05-31 09:07:37 +02:00 committed by Wido den Hollander
parent 58bdb44135
commit 91a8faac31
3 changed files with 6 additions and 2 deletions

View File

@ -83,8 +83,8 @@
Allow from 127.0.0.0/255.0.0.0 ::1/128
</Directory>
# 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.

View File

@ -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

View File

@ -49,6 +49,7 @@ class CsApache(CsApp):
file.search("<VirtualHost.*:443>", "\t<VirtualHost %s:443>" % (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()