
OpenBSD's httpd gets URL rewrite - njn
https://marc.info/?l=openbsd-tech&m=152761257806283&w=2
======
Athas
I don't have much to say about this patch in particular, but I want to praise
OpenBSD's httpd in general. I'm a hacker, not a systems administrator, and
while I know how to set up Unix systems, I'm not an expert, nor do I have the
time or inclination to become one. OpenBSD's httpd (and the other OpenBSD
daemons for that matter) are distinct in that they have so few features, and
are documented so well, that I can configure them and feel that I understand
exactly the implications of my configuration. I trust that what I have built
works. I have even read the code on occasion if I was unsure about something -
it's short and simple, so it's perfectly feasible.

I have no illusions about OpenBSD's httpd being able to replace nginx or
Apache in larger deployments, or that the latter cannot be configured to be
just as safe and robust, but for the lone hacker or researcher who just needs
a simple web server to serve static files or front FastCGI, OpenBSD's httpd is
an excellent fit.

~~~
IntelMiner
This is something I rather like about Lighttpd over in the Linux world

I want to have a simple web server on my server at home to run a distro mirror
and some other HTTP-centric things

I install lighttpd, and just dump all the files I want to serve in
/var/www/localhost/htdocs

Start the daemon, bam, working. No messing about with htaccess or other things

~~~
Athas
I used lighttpd before OpenBSD's httpd, and while it is close, it still has
far more features and configuration knobs. It's not just about whether things
work by default (Apache usually does as well), but whether I fully understand
what my configuration actually _means_ , and what the server ends up doing.

------
notaplumber
This is a patch. It was sent to a mailing list for review. It has not been
committed.

Also here's the revised patchset, which is more thorough and changes some
config syntax:

[https://marc.info/?l=openbsd-
tech&m=152763303217829&w=2](https://marc.info/?l=openbsd-
tech&m=152763303217829&w=2)

[https://marc.info/?l=openbsd-
tech&m=152763343417988&w=2](https://marc.info/?l=openbsd-
tech&m=152763343417988&w=2) (adds rewrite)

[https://marc.info/?l=openbsd-
tech&m=152763318517884&w=2](https://marc.info/?l=openbsd-
tech&m=152763318517884&w=2)

------
mfontani
What I really like about this is how short, and readable, the patchset for the
feature is.

Sure, it lacks tests - and it's had a couple revisions since… but it's
something to behold.

------
stock_toaster
I'm hopeful that someday httpd will support adding custom response headers --
for things such as adding a cache-control header.

Until then, it seems the recommendation is to run relayd in front of httpd, in
order to add such headers.

