summaryrefslogtreecommitdiff
path: root/src/Propellor/Property/SiteSpecific/JoeySites.hs
diff options
context:
space:
mode:
authorJoey Hess2016-03-30 14:32:35 -0400
committerJoey Hess2016-03-30 14:32:35 -0400
commitafca378d8624b31955e778d8d9a66713a3431f36 (patch)
tree3cd93c1ac35a336b185315715dbf5da5edd2aa7d /src/Propellor/Property/SiteSpecific/JoeySites.hs
parente9f421a3f9fc953b82f606836ddea527a9a20e84 (diff)
propellor spin
Diffstat (limited to 'src/Propellor/Property/SiteSpecific/JoeySites.hs')
-rw-r--r--src/Propellor/Property/SiteSpecific/JoeySites.hs24
1 files changed, 9 insertions, 15 deletions
diff --git a/src/Propellor/Property/SiteSpecific/JoeySites.hs b/src/Propellor/Property/SiteSpecific/JoeySites.hs
index 0ce64939..227f0131 100644
--- a/src/Propellor/Property/SiteSpecific/JoeySites.hs
+++ b/src/Propellor/Property/SiteSpecific/JoeySites.hs
@@ -20,6 +20,7 @@ import qualified Propellor.Property.Apache as Apache
import qualified Propellor.Property.Postfix as Postfix
import qualified Propellor.Property.Systemd as Systemd
import qualified Propellor.Property.Fail2Ban as Fail2Ban
+import qualified Propellor.Property.LetsEncrypt as LetsEncrypt
import Utility.FileMode
import Data.List
@@ -296,24 +297,21 @@ annexWebSite origin hn uuid remotes = propertyList (hn ++" website using git-ann
, "git update-server-info"
]
addremote (name, url) = "git remote add " ++ shellEscape name ++ " " ++ shellEscape url
- setupapache = apacheSite hn True
+ setupapache = Apache.httpsVirtualHost' hn dir letos
[ " ServerAlias www."++hn
- , ""
- , " DocumentRoot /srv/web/"++hn
- , " <Directory /srv/web/"++hn++">"
- , " Options FollowSymLinks"
- , " AllowOverride None"
- , Apache.allowAll
- , " </Directory>"
- , " <Directory /srv/web/"++hn++">"
+ , Apache.iconDir
+ , " <Directory "++dir++">"
, " Options Indexes FollowSymLinks ExecCGI"
, " AllowOverride None"
, " AddHandler cgi-script .cgi"
, " DirectoryIndex index.html index.cgi"
- , Apache.allowAll
+ , Apache.allowAll
, " </Directory>"
]
+letos :: LetsEncrypt.AgreeTOS
+letos = LetsEncrypt.AgreeTOS (Just "id@joeyh.name")
+
apacheSite :: HostName -> Bool -> Apache.ConfigFile -> RevertableProperty DebianLike DebianLike
apacheSite hn withssl middle = Apache.siteEnabled hn $ apachecfg hn withssl middle
@@ -335,11 +333,7 @@ apachecfg hn withssl middle
, " CustomLog /var/log/apache2/access.log combined"
, " ServerSignature On"
, " "
- , " <Directory \"/usr/share/apache2/icons\">"
- , " Options Indexes MultiViews"
- , " AllowOverride None"
- , Apache.allowAll
- , " </Directory>"
+ , Apache.iconDir
, "</VirtualHost>"
]
where