Install Apache In Freenas Jail Host

Installing GitWeb on FreeNAS Learn how to install GitWeb to browse the repositories on your server. Build the Git package from the Ports collection to install GitWeb on an Apache server. Optionally, configure access over HTTPS and LDAP authentication. Preparing the jail; Installing GitWeb from Ports; Configuring the web service. — Install Apache. The Apache web server is currently the most popular web server in the world. It is assumed that a FreeNAS jail has been setup as per Issue #329 and root access has been obtained. Update the ports tree: portsnap fetch extract Once that is done, build mariadb55-server from the ports tree, the uninstall mariadb55-server. This is to resolve the source dependencies for recompiling the MariaDB server later on with wsrep. No jail is created because the DNS fails during the use of the plugin install and everything is rolled back by freenas. Any portion of the plugin setup that requires the jail to do DNS lookups fails. The documentation states that resolv.conf is inherited from the host. That doesn't appear to be happening for the jail.

# you may have to install curl and nano and some other tools into the jail pkg install curl wget nano curl localhost:8086/query -data-urlencode 'q=show databases' Step 3: create the databases We’ll need 2 databases: one that will receive collectd data from the various rasperry pi’s and other things that support collectd, and one that will.

These notes are with respect to FreeNAS 11.3, Git 2.6, and Apache 2.4.

Let’s begin by adding a jail. Within Jails, click Add Jail. Most of this is default. Here are the settings for a currently working config: DHCP Autoconfigure IPv4 unchecked, NAT unchecked, VNET checked, Berkeley Packet Filter checked, IPv4 statically defined, Autoconfigure IPv6 unchecked, Auto-start checked, mount_devfs checked, mount_fedscfs checked, allow_set_hostname checked, all other jail allow_* properties unchecked, Network interface vnet0:bridge0, within Custom Properties host_time checked).

To install Git, we want to get to a shell on the FreeNAS system (ssh works too).
# shell into the jail
$ sudo iocage console git
# install dependencies
$ pkg install git apache24

The next thing to do is create a Git repo within the jail. There are plenty of online references for this, though creating an initial bare repository is the goal.

To use this repo over HTTP, there are some additional configs to setup. Below is the content for the config file at the root of the repo.Also, configure the file system to be modifiable by the Apache user.
$ chown -R www:www /data/git/repos/brian.git

Install Drivers Freenas

Install Apache In Freenas Jail Host

The last bit of work is to configure Apache. Here is a working /usr/local/etc/apache24/Includes/git.conf file where the path /ro/ is used for read-only access to the repository (helpful for CI builds).Then test and restart Apache.
$ apachectl configtest && apachectl restart

Install Apache In Freenas Jail Host Command

The Git repo should now be available over HTTP.
# read-only
$ git clone http://.../ro/brian.git
# read-write
$ git clone http://.../brian.git