#
# Default httpd.conf file for Pleroma on OpenBSD
# Simple installation instructions
# 1. Place file in /etc
# 2. Replace <ipaddr> with your public IP address
# 3. If using IPv6, uncomment IPv6 lines and replace <ip6addr> with your public IPv6 address
# 4. Replace all occurences of example.tld with your instance's domain name.
# 5. Check file using 'doas httpd -n'
# 6. Enable and start httpd:
#      # doas rcctl enable httpd
#      # doas rcctl start httpd
#

ext_inet="<ipaddr>"
#ext_inet6="<ip6addr>"

server "example.tld" {
    listen on $ext_inet port 80 # Comment to disable listening on IPv4
    #listen on $ext_inet6 port 80 # Comment to disable listening on IPv6
    listen on 127.0.0.1 port 80 # Do NOT comment this line

    log syslog
    directory no index

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

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

# Example of serving a basic static website besides Pleroma using the example configuration in relayd
#server "site.example.tld" {
#    listen on 127.0.0.1 port 8080
#
#    location "/*" {
#        root "/website"
#    }
#}

types {
    include "/usr/share/misc/mime.types"
}

