Prerequisite(s): A storage pool must be created and a binary kit must be installed. The binary kit is needed because it contains libpcre, a dynamic library needed by nginx.
Let's get started adding a nginx web server, to our ZFS min (NO HTTPD) storage image. First, get the pre-built nginx version 0.8.32 here. I have also included compilation notes under the nginx section in case you wish to compile and add other features on your own. Transfer the nginx-0,8.32,tgz file to the storage pool via CIFS share, sftp or USB. Here, I start with the file located in /tmp and a storage pool named abyss. Substitute your zpool name for abyss.
cd /abyss gzip -dc /tmp/nginx-0.8.32.tgz | tar -xf -Now let's add the automation entries to /mnt/eon0/.exec. Also, execute the commands to create the necessary symlinks. These entries align paths entered in nginx.conf
(cd /usr ; ln -s ../abyss/nginx .)At this stage, the nginx web server is ready to run, but feel free to customize the /abyss/nginx/conf/nginx.conf and generate your own /abyss/nginx/conf/cert.pem, /abyss/nginx/conf/cert.key file. OpenSSL (part of the binary kit which is a pre-requisite for this post) would be needed to generate your own self signed cert file (cert.pem, cert.key). To start and automate the web server, run and add the following to /mnt/eon0/.exec.
/usr/nginx/sbin/nginx -c /usr/nginx/conf/nginx.conf