These notes are with respect to FreeNAS 11.3, Artifactory 5.8, 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 Artifactory, we want to get to a shell on the FreeNAS system (ssh works too). # shell into the jail
$ sudo iocage console artifactory
# install using ports
# if you do not have /usr/ports, run portsnap fetch && portsnap extract
$ cd /usr/ports/devel/artifactory
$ make install clean
Artifactory runs by default on port 8081. A recommended way to access it over HTTP port 80 is to setup Apache as a proxy. Here is a working /usr/local/etc/apache24/Includes/artifactory.conf file.
LoadModule proxy_module libexec/apache24/mod_proxy.so LoadModule proxy_http_module libexec/apache24/mod_proxy_http.so <VirtualHost *:80> ProxyPreserveHost On ProxyRequests Off ProxyPass / http://localhost:8081/ ProxyPassReverse / http://localhost:8081/ </VirtualHost>Then test and restart Apache.
$ apachectl configtest && apachectl restart
Artifactory should now be available over HTTP (port 80).