Hero Image

Install Apache HTTP Server on OpenBSD 7.5

Install Apache HTTP Server on OpenBSD 7.5

Step 1 – Install Apache

pkg_add apache-httpd

Step 2 – Start and enable the service

rcctl enable apache2 && rcctl start apache2

Step 3 – Open firewall ports

# /etc/pf.conf:
# pass in on egress proto tcp to port { 80 443 }
pfctl -f /etc/pf.conf

Step 4 – Verify

curl -I http://localhost

The main configuration file is /etc/apache2/httpd.conf and virtual-host definitions belong in /etc/apache2/conf.d/.

Apache version

apachectl -v