# Serving Poudriere Packages from jailed HTTPD



## nanotek (Apr 16, 2014)

I've got Poudriere running on the host, and a webserver (NGINX) running inside a jail on the host.

How do I get the jailed webserver to serve the Poudriere packages from zpool/poudriere/data/packages for remote clients to use? Thanks.


----------



## SirDice (Apr 16, 2014)

nanotek said:
			
		

> I've got Poudriere running on the host, and a webserver (NGINX) running inside a jail on the host.
> 
> How do I get the jailed webserver to serve the Poudriere packages from zpool/poudriere/data/packages for remote clients to use? Thanks.


Configure nginx to share the /usr/local/poudriere/data directory. Or where else you set ${BASEFS} to in poudriere.conf. You then need a configuration like this:

```
location / {
            root   /storage/poudriere/data;
            index  index.html index.htm;
            fancyindex on;
            fancyindex_ignore build cache queue up.txt;
        }
```
Note that this uses fancyindex so you need to enable it when building www/nginx, it's not enabled by default.


----------



## nanotek (Apr 18, 2014)

Thanks for the NGINX location block, @SirDice. But how do I make the poudriere/data directory accessible to the jail?


----------



## SirDice (Apr 18, 2014)

nanotek said:
			
		

> But how do I make the poudriere/data directory accessible to the jail?


Using nullfs(5). Add to /etc/fstab.JAILNAME:

```
/usr/local/poudriere/data       /jails/j-internetz/data         nullfs  ro      0       0
```
And make sure jail.conf has this for your jail:

```
mount.fstab = /etc/fstab.$name;
```


----------



## nanotek (Apr 20, 2014)

Thanks, @SirDice! I'll give it a try.


----------

