You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
712 B
36 lines
712 B
# $OpenBSD: httpd.conf,v 1.20 2018/06/13 15:08:24 reyk Exp $
|
|
|
|
server "{{ fqdn }}" {
|
|
listen on * port 80
|
|
location "/.well-known/acme-challenge/*" {
|
|
root "/acme"
|
|
request strip 2
|
|
}
|
|
{% if not tls %}
|
|
location "/pub/*" {
|
|
directory auto index
|
|
}
|
|
{% endif %}
|
|
{% if tls %}
|
|
location * {
|
|
block return 302 "https://$HTTP_HOST$REQUEST_URI"
|
|
}
|
|
{% endif %}
|
|
}
|
|
|
|
{% if st_tls.results.0.stat.exists and st_tls.results.1.stat.exists and tls %}
|
|
server "{{ fqdn }}" {
|
|
listen on * tls port 443
|
|
tls {
|
|
certificate "{{ tls_certificate }}"
|
|
key "{{ tls_key }}"
|
|
}
|
|
location "/pub/*" {
|
|
directory auto index
|
|
}
|
|
location "/.well-known/acme-challenge/*" {
|
|
root "/acme"
|
|
request strip 2
|
|
}
|
|
}
|
|
{% endif %}
|
|
|