Skip to content

Run obhttpd on FreeBSD

About obhttpd

Restart obhttpd on FreeBSD
Restart obhttpd on FreeBSD

The httpd program first appeared in OpenBSD 5.6. httpd is based on relayd.

obhttpd is the FreeBSD port of the OpenBSD http server.

OpenBSD httpd man

Install obhttpd

cd /usr/ports/www/obhttpd
make install clean

Configure obhttpd

configure /usr/local/etc/obhttpd.conf:

chroot  "/www"
server "default" {
        listen on $ext_addr port 80
        root    "/default"

make folders:

mkdir -p /www/{default,logs}
chown -R www:www /www

configure sysrc:

echo 'obhttpd_enable="YES"' >> /etc/rc.conf.local

Test obhttpd configure and run obhttpd

Test On Console:

obhttpd -d -v

then read the error on the console. If no error, the daemon will not stop running.

Then press ctrl + c to interrupt the obhttpd daemon or killall obhttpd on another terminal to kill obhttpd.

run obhttpd:

service obhttpd start
service obhttpd status
service obhttpd restart

If no error, it will report obhttpd is running. Otherwise read the error log file /www/logs/error.log.

Open your browser and visit

Put your web pages on /www/default/

echo "Hello, OpenBSD httpd!" > /www/default/index.html
chown www:www /www/default/index.html

Then refresh the browser (



No Trackbacks


Display comments as Linear | Threaded

No comments

Add Comment

E-Mail addresses will not be displayed and will only be used for E-Mail notifications.

To prevent automated Bots from commentspamming, please enter the string you see in the image below in the appropriate input box. Your comment will only be submitted if the strings match. Please ensure that your browser supports and accepts cookies, or your comment cannot be verified correctly.

Form options

Submitted comments will be subject to moderation before being displayed.