From 57a159a6d42bacc2e5239cd13c44679955ea3a9b Mon Sep 17 00:00:00 2001 From: Martin Geno Date: Thu, 29 Dec 2016 06:00:45 +0100 Subject: [PATCH] fix mailserver spamassassin and warehost-host caddy template --- mailserver/tasks/spamassassin.yml | 2 +- warehost-host/templates/caddy.conf | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/mailserver/tasks/spamassassin.yml b/mailserver/tasks/spamassassin.yml index df0fb8e..973d21b 100644 --- a/mailserver/tasks/spamassassin.yml +++ b/mailserver/tasks/spamassassin.yml @@ -1,6 +1,6 @@ --- - name: Spamassassin update - command: sa-update -v + command: /usr/bin/vendor_perl/sa-update -v register: bass_result changed_when: "bass_result.rc != 1" ignore_errors: yes diff --git a/warehost-host/templates/caddy.conf b/warehost-host/templates/caddy.conf index 2661ece..c0516c7 100644 --- a/warehost-host/templates/caddy.conf +++ b/warehost-host/templates/caddy.conf @@ -8,7 +8,9 @@ {{if not .Redirect}} gzip {{if .Proxy}} - proxy / {{.Proxy}} + proxy / {{.Proxy}} { + header_upstream Host {host} + } {{else}} root [% warehost_host_web_webroot %]/{{template "domain" .}} {{if .PHP}} @@ -16,7 +18,7 @@ env PHP_ADMIN_VALUE "open_basedir=/tmp:/usr/share/webapps/:/etc/webapps/:/usr/share/pear:/dev/urandom:[% warehost_host_web_webroot %]/{{template "domain" .}}" } rewrite { - to {path} {path}/ /index.php?_url={uri} + to {path} {path}/ /index.php/{uri} } {{end}} {{end}} @@ -29,7 +31,7 @@ {{if .SSLRedirect}} http://{{template "domain".}} { {{if not .Redirect}} - redir https://{{template "domain".}}{uri} + redir {{template "domain".}}{uri} {{else}} {{template "content" .}} {{end}}