Synopsis #
OpenBSD includes httpd(8) for serving static and FastCGI content and relayd(8) for proxying and load balancing. nginx and Apache HTTP Server are available as packages.
This section provides the shared web server comparison. Configuration and administration remain documented in the httpd , nginx , Apache , and relayd guides.
Service Selection #
The application’s interface and configuration requirements determine the appropriate service.
- Static websites: httpd provides file serving and TLS within the base system. It is a suitable starting point for static pages and generated documentation.
- HTTP application backends: relayd forwards connections to backend services and supports health checks. nginx also provides HTTP reverse proxying and proxy caching. Selection depends on the required protocol behavior and configuration.
- PHP and FastCGI applications: httpd can connect to a FastCGI process such as PHP-FPM. Application rewrite requirements and access to files and sockets within the server’s chroot require consideration.
- Apache-specific applications: Apache is appropriate when required modules or existing
.htaccessrules make its configuration model necessary. Main server configuration is preferable when per-directory overrides are unnecessary.
Web Server Comparison #
The following table compares the three content-serving web servers. Module availability and enabled features depend on the installed package and configuration.
| Feature | httpd | nginx | Apache |
|---|---|---|---|
| Distribution | Base system | Package | Package |
| Static content | Yes | Yes | Yes |
| FastCGI applications | Built-in FastCGI support | FastCGI module | mod_proxy_fcgi |
| TLS | Built in | HTTP SSL module | mod_ssl |
| HTTP/2 | Not supported | HTTP/2 module required | mod_http2 required |
| HTTP reverse proxy | Separate proxy required, such as relayd | HTTP proxy module | mod_proxy with the appropriate protocol module |
.htaccess files | Not supported | Not supported | Supported when permitted by server configuration |
FastCGI passes requests to a FastCGI application process; it is not HTTP reverse proxying.
relayd is a separate daemon with its own configuration in relayd.conf(5) . It can proxy traffic, terminate TLS, and monitor backends, but it does not serve the site’s files. The relayd guide covers its role in front of a web server or application.
Package Information #
The package catalog provides versions, dependencies, and available OpenBSD README instructions. Package information must match the installed OpenBSD branch; a ports entry does not establish binary availability for every architecture.
- nginx: release package and current package .
- Apache HTTP Server: release package and current package .
httpd and relayd do not require separate packages. Installation and update procedures for third-party software are covered in Managing Software: Packages and Ports .
References #
- httpd(8) , httpd.conf(5) , and relayd(8) .
- nginx HTTP proxy , FastCGI , and HTTP/2 modules.
- Apache mod_proxy , mod_proxy_fcgi , HTTP/2 , and .htaccess guidance .