50 lines
1.2 KiB
Plaintext
50 lines
1.2 KiB
Plaintext
|
#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}}
|
||
|
proxy / {{.Proxy}}
|
||
|
{{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 {
|
||
|
to {path} {path}/ /index.php?_url={uri}
|
||
|
}
|
||
|
{{end}}
|
||
|
{{end}}
|
||
|
{{else}}
|
||
|
redir https://{{.Redirect}}{uri}
|
||
|
{{end}}
|
||
|
{{end}}
|
||
|
|
||
|
{{if .SSL}}
|
||
|
{{if .SSLRedirect}}
|
||
|
http://{{template "domain".}} {
|
||
|
{{if not .Redirect}}
|
||
|
redir https://{{template "domain".}}{uri}
|
||
|
{{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}}
|