$ doas mkdir /var/www/auth $ doas chown www /var/www/auth
$ doas htpasswd /var/www/auth/.htpasswd_foo username Password: Retype password: $ doas chown www /var/www/auth/.htpasswd_foo
location "/foo/*" { authenticate with "/auth/.htpasswd_foo" }
$ doas rcctl restart httpd httpd(ok) httpd(ok)
[0] https://man.openbsd.org/OpenBSD-7.0/htpasswd.1
[1] https://man.openbsd.org/OpenBSD-7.0/httpd.conf.5#location
Send comments and suggestions to @antics@mastodon.nu