Tools Index

Httpd

On OpenBSD copy default configuration file;

        # cp /etc/examples/httpd.conf /etc/httpd.conf
        

Default configuration looks like this;

        # $OpenBSD: httpd.conf,v 1.20 2018/06/13 15:08:24 reyk Exp $

        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"
                }
                location "/pub/*" {
                        directory auto index
                }
                location "/.well-known/acme-challenge/*" {
                        root "/acme"
                        request strip 2
                }
        }
        

Check configuration;

        httpd -n
        
Tools Index

This is part of the LeetIO System Documentation. Copyright (C) 2021 LeetIO Team. See the file Gnu Free Documentation License for copying conditions.