OpenBSD's httpd port

Stanislaw Adaszewski s.adaszewski at gmail.com
Fri Jan 22 08:44:50 UTC 2016


Hi guys,

I have a semi-working port of OpenBSD's new httpd running
on FreeBSD.

It is based on the current (i.e. as of today) sources from
OpenBSD repo. Furthermore I've pulled in imsg.c, imsg.h,
imsg-buffer.c from OpenBSD's libutil.

Also, libressl and libevent2 need to be installed from
FreeBSD's port collection.

In spite of this, some things are missing, notably:
- tls_handshake() is not implemented in FreeBSD's libressl
  I didn't investigate how to handle this, I presume the
  SSL support is not functioning until a workaround is
  implemented or libressl updated to OpenBSD's version
- crypt_checkpass() is not implemented in FreeBSD, it should
  be pretty trivial to port/implement it, it's used for
  checking .htaccess/.htpasswd type hashes; right now this
  mechanism is non-functional

Other than that after applying the following patch (attached)
the daemon manages to start in a chroot-ted environment and
serve both raw and PHP files (via fastcgi to PHP-FPM).

I wanted to ask if there's a chance to get this put into
FreeBSD's port tree while I keep working on the missing
functionality? The rationale for this is that httpd is
one of the smallest and most robust ways of setting up
e.g. WordPress installation. Doing the same with nginx was
at least cumbersome. There's another patch of mine in the
openbsd-tech list which adds URL rewriting support to httpd.
I feel that there's a niche for such simple lightweight
daemon and efforts should be made to collaborate with OpenBSD
people on this one.
 
Best,

S.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: httpd_freebsd.patch
Type: text/x-diff
Size: 7054 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-ports/attachments/20160120/97aa7920/attachment.patch>
-------------- next part --------------
chroot "/var/www"

server "default" {
    listen on * port 80
    root "/htdocs/test"

    location "*.php" {
        fastcgi socket "/run/php-fpm.sock"
    }
}



More information about the freebsd-ports mailing list