pkgin install bozohttpd-20240126 php-8.3.4
By default httpd is run under _httpd user. To start from command line and specify another user (e.g. nobody) type:
/usr/libexec/httpd -b -U nobody -C .php /usr/pkg/libexec/cgi-bin/php /var/www/
To start httpd automatically, edit /etc/rc.conf (not /etc/rc.local , not /etc/defaults/rc.conf):
httpd=YES
httpd_flags="-b"
httpd_flags="-C .php /usr/pkg/libexec/cgi-bin/php"
httpd_wwwuser="nobody" # this is a separate variable,
# you may read 'man 5 rc.conf' about it
# and about other variables