Basic Webserver (httpd) | OpenBSD Handbook

submited by
Style Pass
2022-05-12 14:00:09

OpenBSD comes with a built-in webserver called httpd. In contrast to Redhat (deriviate) Linux distributions, this is not a rebranded version of the Apache webserver. Instead, it’s a very basic webserver that supports FastCGI and TLS. The biggest downside of this server is the lack of gzip compression which results in larger than necessary files being transmitted and the accompanying performance penalty. The idea behind this is very much in line with the larger OpenBSD philosophy that security is top priority and performance may take a hit in achieving that.

The webserver should be up and running. This can be tested by browsing to the IP address of the server. Now you can add additional content and configure the DNS. Or add SSL support to the configuration.

In case you have multiple virtual servers only accessible via SSL, you can redirect all traffic from HTTP to HTTPS via the following configuration snippet:

Leave a Comment