Hero Image

Install Apache HTTP Server on NetBSD 10

Install Apache HTTP Server on NetBSD 10

Step 1 – Install Apache

pkgin update
pkgin install apache24

Step 2 – Start and enable the service

echo 'apache=YES' >> /etc/rc.conf && service apache start

Step 3 – Open firewall ports

# Configure NPF to allow ports 80 and 443

Step 4 – Verify

curl -I http://localhost

The main configuration file is /usr/pkg/etc/httpd/httpd.conf and virtual-host definitions belong in /usr/pkg/etc/httpd/extra/.

Apache version

apachectl -v