Open Httpd

1- doas cp /etc/examples/httpd.conf /etc/httpd.conf
2- doas nano /etc/httpd.conf
3-

server "domain name" {

        listen on 127.0.0.1 port 80
        directory index index.html
        root "/htdocs"
        location "*.php" {
                fastcgi socket "/run/php-fpm.sock"
        }

}

4- You can ensure pf allows incoming http connections by putting this line into /etc/pf.conf:
pass in quick proto tcp to port {http https}
reload pf: doas pfctl -f /etc/pf.conf

5- doas rcctl enable httpd
doas rcctl start httpd

6- https://wiki.ircnow.org/index.php?n=Openhttpd.Hosting
7- $ doas mkdir -p /var/www/htdocs/
$ doas ln -s /var/www/htdocs/ /home/Almajd/htdocs
$ doas chown -R Almajd:daemon /var/www/htdocs/