OmniOS: Installation of HTTPi

Configuring a local lightweight webserver for various purposes

This article is part of a series focused on the building and setup of a home-NAS based on ZFS and OmniOS. The index is located here: An OmniOS ZFS Fileserver.

I needed a local webserver to provide various info about the server and to be able to issue commands without logging in via SSH: for example I wanted to load data from external devices (Arduino-based) into a SQLite3 database located on the server, or I wanted to query another SQLite3 database and output the results as webpage (for example, to monitor the internal temperatures and status of the disks).

I am used to write Perl scripts, therefore the server HTTPi was my first choice: 10 KB in memory and ability to run directly Perl code.

The steps I followed are now listed.

$ wget
$ mkdir httpi
$ cd httpi
$ tar xf httpi-1.7.1.tar.gz
$ cd httpi-1.7.1

$ pfexec mkdir /var/httpi
$ pfexec groupadd -g 404 httpi
$ pfexec useradd -g 404 -u 404 -d /var/httpi -s /bin/false httpi
$ pfexec chown httpi:httpi /var/httpi/
$ pfexec zfs create -o aclinherit=passthrough-x -o aclmode=passthrough tank/home/httpi
$ pfexec chown httpi:httpi /tank/home/httpi
$ pfexec chmod g+rwx /tank/home/httpi
$ pfexec zfs set sharesmb=on tank/home/httpi
$ pfexec perl configure.demonic

Then I configured the actual HTTPi server in demonic mode:

...  [/bin/perl]: /opt/perl/bin/perl
Install path? [/usr/local/bin/httpi]:
Use sigaction()/ for signal handling? [y]:
Mount point? [/usr/local/htdocs]: /tank/home/httpi
Log path? [/tank/home/httpi/access.log]:
Server host name? [OmniOS-Xeon]:
enter -0800 for 8 hours behind Greenwich mean). [+0000]:
Enable restriction matrix? [y]: n
Which type of logging should be used, 1, 2 or 3? [2]:
Enable HTTPerl? [n]: y
Enable CGI file extension validation? [n]:
Resolve IP addresses to hostnames? [y]: n
Enable host name redirects? [n]:
Enable PATH_INFO support? [n]:
Lowest UID to serve files? [1]: 404
Enable user filesystem? [n]:
Enable preparsing? [n]:
Use throttling? [n]:
Auto-kill the link on slow data transfers? [n]:
Enable virtual filesystem? [n]:
Enable HTTPi statistics? [n]: y
Bind to which numerical IP address? []:
Which TCP port number? [80]: 8080

I used the attached SMF configuration, generated from , to load the SMF service.

Author: Olaf Marzocchi

First revision: 2015-02-01.
Last revision: 2015-02-01.