This repository has been archived on 2020-09-27. You can view files and clone it, but cannot push or open issues or pull requests.
2016-11-27 10:06:35 +01:00
|
|
|
#jinja2:variable_start_string:'[%' , variable_end_string:'%]'
|
|
|
|
# ID: {{.ID}} - Domain: {{.Domain.ID}} - Profil: {{.Domain.Profil.ID}}
|
|
|
|
# Login: {{.Domain.Profil.Login.ID}} -> {{.Domain.Profil.Login.Username}}
|
|
|
|
# {{.Subdomain}} - {{.Domain.FQDN}}
|
|
|
|
|
|
|
|
{{ define "domain" }}{{if .Subdomain}}{{.Subdomain}}.{{end}}{{.Domain.FQDN}}{{ end }}
|
|
|
|
{{ define "content"}}
|
|
|
|
{{if not .Redirect}}
|
|
|
|
gzip
|
|
|
|
{{if .Proxy}}
|
2016-12-29 06:00:45 +01:00
|
|
|
proxy / {{.Proxy}} {
|
|
|
|
header_upstream Host {host}
|
|
|
|
}
|
2016-11-27 10:06:35 +01:00
|
|
|
{{else}}
|
|
|
|
root [% warehost_host_web_webroot %]/{{template "domain" .}}
|
|
|
|
{{if .PHP}}
|
|
|
|
fastcgi / unix:/run/php-fpm/php-fpm.sock php {
|
|
|
|
env PHP_ADMIN_VALUE "open_basedir=/tmp:/usr/share/webapps/:/etc/webapps/:/usr/share/pear:/dev/urandom:[% warehost_host_web_webroot %]/{{template "domain" .}}"
|
|
|
|
}
|
|
|
|
rewrite {
|
2016-12-29 06:00:45 +01:00
|
|
|
to {path} {path}/ /index.php/{uri}
|
2016-11-27 10:06:35 +01:00
|
|
|
}
|
|
|
|
{{end}}
|
|
|
|
{{end}}
|
|
|
|
{{else}}
|
|
|
|
redir https://{{.Redirect}}{uri}
|
|
|
|
{{end}}
|
|
|
|
{{end}}
|
|
|
|
|
|
|
|
{{if .SSL}}
|
|
|
|
{{if .SSLRedirect}}
|
|
|
|
http://{{template "domain".}} {
|
|
|
|
{{if not .Redirect}}
|
2016-12-29 06:00:45 +01:00
|
|
|
redir {{template "domain".}}{uri}
|
2016-11-27 10:06:35 +01:00
|
|
|
{{else}}
|
|
|
|
{{template "content" .}}
|
|
|
|
{{end}}
|
|
|
|
}
|
|
|
|
https://{{template "domain".}} {
|
|
|
|
{{template "content" .}}
|
|
|
|
}
|
|
|
|
{{else}}
|
|
|
|
http://{{template "domain" .}},https://{{template "domain".}} {
|
|
|
|
{{template "content" .}}
|
|
|
|
}
|
|
|
|
{{end}}
|
|
|
|
{{else}}
|
|
|
|
http://{{template "domain".}} {
|
|
|
|
{{template "content" .}}
|
|
|
|
}
|
|
|
|
{{end}}
|