# $OpenBSD: httpd.conf,v 1.22 2020/11/04 10:34:18 denis Exp $ # Directory to chroot chroot "/var/www" # MIME types include "/etc/mimetypes" default type text/plain server "example.com" { listen on * port 80 location "/.well-known/acme-challenge/*" { root "/acme" request strip 2 } location * { block return 302 "https://$HTTP_HOST$REQUEST_URI" } } server "example.com" { listen on * tls port 443 tls { certificate "/etc/ssl/example.com.fullchain.pem" key "/etc/ssl/private/example.com.key" } root /sites/example.com # /var/www/sites/example.com location "/pub/*" { directory auto index } location "/.well-known/acme-challenge/*" { root "/acme" request strip 2 } }