Perfecting httpd(8) for ssllabs

OpenBSD ships with a built-in webserver, http(8). It has sane and neat defaults, like perfect forward secrecy ciphers, proper kex and TLSv1.2. Roman Zolotarev has written an excellent starting point for newcomers.

If you desire to go the extra mile, here is how to score an A+ and 100% for the certificate, protocol, kex and cipher categories, some additional config is needed. Using this configuration, it can be achieved:

  listen on * tls port 443
  hsts {
  alias ""
  root "/htdocs/"
  tls {
    certificate "/etc/ssl/"
    key "/etc/ssl/private/"
    dhe "auto"
    ecdhe "P-384"
  location "/.well-known/acme-challenge/*" {
    root { "/acme", strip 2 }

server "" {
  listen on * port 80
  alias ""
  block return 301 "$REQUEST_URI"