Patching httpd(8)—working with OpenBSD src

Though clearly NOT recommended, I went w/ patching httpd(8) on OpenBSD (UPDATE 7.0-stable) 7.1-stable (not -current) as recommended by httpd-plus. Lucky me, building and installing the httpd-plus binary along w/ manpage completed successfully. 🤞
Here are the steps I took:

1. Fetch the -stable src tree

cd /usr
doas cvs \
 -qd anoncvs@ftp.hostserver.de:/cvs \
 checkout -rOPENBSD_7_3 -P src

2. Fetch httpd-plus src

cd ~
ftp -Vo - \
 https://codeload.github.com/mpfr/httpd-plus/tar.gz/refs/heads/7.3-stable \
 | tar xzvf -

3. Install httpd-plus

…by applying patches and building httpd binary.

doas ksh httpd-plus-7.3-stable/install 2>&1 \
 | tee httpd-plus-7.3-install.log

4. Adapt httpd.conf

# /etc/httpd.conf

#  location not found "/*" {
#    request rewrite "/error/index.html"
#  }
errdocs "/htdocs/openwebcraft.com/errdocs"

5. Validate httpd-conf and restart httpd

doas httpd -n
doas rcctl restart httpd

Resources

Always recommended reading—PRIOR to doing anything (of course): the excellent OpenBSD website and FAQs.In particular:

  1. Anonymous CVS
  2. Building the System from Source