From 56dd63916925627773cb2cf590f1c8191470dccc Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 13 Apr 2014 21:04:34 -0400 Subject: propellor spin --- Propellor/Property/Apache.hs | 10 ++++++++++ Propellor/Property/SiteSpecific/JoeySites.hs | 10 ++++++---- 2 files changed, 16 insertions(+), 4 deletions(-) (limited to 'Propellor') diff --git a/Propellor/Property/Apache.hs b/Propellor/Property/Apache.hs index eab87862..f45ef9df 100644 --- a/Propellor/Property/Apache.hs +++ b/Propellor/Property/Apache.hs @@ -50,3 +50,13 @@ restarted = cmdProperty "service" ["apache2", "restart"] reloaded :: Property reloaded = Service.reloaded "apache2" + +-- | Configure apache to use SNI to differentiate between +-- https hosts. +multiSSL :: Property +multiSSL = "/etc/apache2/conf.d/ssl" `File.hasContent` + [ "NameVirtualHost *:443" + , "SSLStrictSNIVHostCheck off" + ] + `describe` "apache SNI enabled" + `onChange` reloaded diff --git a/Propellor/Property/SiteSpecific/JoeySites.hs b/Propellor/Property/SiteSpecific/JoeySites.hs index bd6e93f3..73a8f71f 100644 --- a/Propellor/Property/SiteSpecific/JoeySites.hs +++ b/Propellor/Property/SiteSpecific/JoeySites.hs @@ -65,7 +65,7 @@ gitServer hosts = propertyList "git.kitenet.net setup" , toProp $ Git.daemonRunning "/srv/git" , "/etc/gitweb.conf" `File.containsLines` [ "$projectroot = '/srv/git';" - , "@git_base_url_list = ('git://git.kitenet.net', 'http://git.kitenet.net/git', 'ssh://git.kitenet.net/srv/git');" + , "@git_base_url_list = ('git://git.kitenet.net', 'http://git.kitenet.net/git', 'https://git.kitenet.net/git', 'ssh://git.kitenet.net/srv/git');" , "# disable snapshot download; overloads server" , "$feature{'snapshot'}{'default'} = [];" ] @@ -99,9 +99,11 @@ type AnnexUUID = String -- | A website, with files coming from a git-annex repository. annexWebSite :: [Host] -> Git.RepoUrl -> HostName -> AnnexUUID -> [(String, Git.RepoUrl)] -> Property -annexWebSite hosts origin hn uuid remotes = Git.cloned "joey" origin dir Nothing - `onChange` setup - `onChange` setupapache +annexWebSite hosts origin hn uuid remotes = propertyList (hn ++" website using git-annex") + [ Git.cloned "joey" origin dir Nothing + `onChange` setup + , setupapache + ] where dir = "/srv/web/" ++ hn setup = userScriptProperty "joey" setupscript -- cgit v1.2.3