types {
	include "/usr/share/misc/mime.types"
	application/atom+xml atom
}

server "smartstechnical.com" {
	listen on * port 80

	location "/.well-known/acme-challenge/*" {
		root "/acme"
		request strip 2
	}

	location * {
		block return 301 "https://$HTTP_HOST$REQUEST_URI"
	}
}

server "smartstechnical.com" {
	listen on * tls port 443

	tls {
		certificate "/etc/ssl/smartstechnical.com.fullchain.pem"
		key "/etc/ssl/private/smartstechnical.com.key"
	}

	root "/htdocs/smartstechnical.com"

	# Required when smartpress uses SITE_URL_STYLE=extensionless.
	location not found match "/[^./]+$" {
		request rewrite "$DOCUMENT_URI.html"
	}
}
