From 0aff82ddcd75cf023e35f0b56cf61b202e48bf9d Mon Sep 17 00:00:00 2001 From: basilhendroff <63370329+basilhendroff@users.noreply.github.com> Date: Thu, 21 May 2020 12:29:02 +0800 Subject: [PATCH] Update README.md --- README.md | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 72194e1..0c86190 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,23 @@ # freenas-iocage-caddy Script to install Caddy V2 in a FreeNAS jail -Create the jail and install Caddy `iocage create --name="caddyv2" -r 11.3-RELEASE ip4_addr="vnet0|10.1.1.45/24" defaultrouter="10.1.1.1" boot="on" host_hostname="caddyv2" vnet="on"` - ``` +# Set up the jail + iocage create --name="caddyv2" -r 11.3-RELEASE ip4_addr="vnet0|10.1.1.45/24" defaultrouter="10.1.1.1" boot="on" host_hostname="caddyv2" vnet="on" iocage console caddyv2 - mkdir -p /usr/local/etc/rc.d - cd /usr/local/etc/rc.d - pkg install nano + pkg install nano ca_root_nss + +# Install the rc.d script + mkdir -p /usr/local/etc/rc.d && cd /usr/local/etc/rc.d nano caddy` and paste in the text from includes/caddy + chmod +x caddy + +# Create the Caddyfile + mkdir -p /usr/local/www && cd /usr/local/www + touch Caddyfile + +# Install the Caddy V2 port + fetch https://github.com/caddyserver/caddy/releases/download/v2.0.0/caddy_2.0.0_freebsd_amd64.tar.gz + tar -xzvf caddy_2.0.0_freebsd_amd64.tar.gz + rm caddy_2.0.0_freebsd_amd64.tar.gz ```