Install Nginx on OpenBSD 7.5
This guide walks through installing and starting Nginx on OpenBSD 7.5.
Step 1 – Update installed packages
pkg_add -u
Step 2 – Install Nginx
pkg_add nginx
Step 3 – Enable and start Nginx
rcctl enable nginx
rcctl start nginx
Step 4 – Allow traffic through PF
Add to /etc/pf.conf:
pass in on egress proto tcp to port { 80 443 }
Reload PF:
pfctl -f /etc/pf.conf
Step 5 – Verify
nginx -v
ftp -o - http://localhost
Configuration file: /etc/nginx/nginx.conf.