-
Notifications
You must be signed in to change notification settings - Fork 0
/
jail-nginx.conf
96 lines (73 loc) · 4.22 KB
/
jail-nginx.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
nginx {
#
# start of standard settings for each jail
#
$nic = "nic0";
exec.start = "/bin/sh /etc/rc";
exec.stop = "/bin/sh /etc/rc.shutdown";
exec.clean;
mount.devfs;
path = /jails/$name;
allow.raw_sockets;
#securelevel = 2;
host.hostname = "$name.int.unixathome.org";
exec.consolelog="/var/tmp/jail-console-$name.log";
persist;
#
# end of standard settings for each jail
#
ip4.addr = "$nic|10.55.0.39";
allow.mount=true;
allow.mount.zfs=true;
enforce_statfs=1;
devfs_ruleset=5;
mount.fstab="/etc/fstab.$name";
# because want to mount zfs, we do that before the rc start up
# not sure if we MUST do it in that order.
exec.start="zfs mount -a";
exec.start+="/bin/sh /etc/rc";
mount.fstab="/etc/fstab.$name";
### The lines commented out below are for after step 10
### You'll have to modify these variables to the right values
### ${datazpool}
### $WEB_JAIL
# jail all the things.
# exec.created+="zfs set jailed=on ${datazpool}/freshports/jailed/$WEB_JAIL/cache";
# exec.created+="zfs set jailed=on ${datazpool}/freshports/jailed/$WEB_JAIL/cache/categories";
# exec.created+="zfs set jailed=on ${datazpool}/freshports/jailed/$WEB_JAIL/cache/commits";
# exec.created+="zfs set jailed=on ${datazpool}/freshports/jailed/$WEB_JAIL/cache/daily";
# exec.created+="zfs set jailed=on ${datazpool}/freshports/jailed/$WEB_JAIL/cache/general";
# exec.created+="zfs set jailed=on ${datazpool}/freshports/jailed/$WEB_JAIL/cache/news";
# exec.created+="zfs set jailed=on ${datazpool}/freshports/jailed/$WEB_JAIL/cache/packages";
# exec.created+="zfs set jailed=on ${datazpool}/freshports/jailed/$WEB_JAIL/cache/pages";
# exec.created+="zfs set jailed=on ${datazpool}/freshports/jailed/$WEB_JAIL/cache/ports";
# exec.created+="zfs set jailed=on ${datazpool}/freshports/jailed/$WEB_JAIL/cache/spooling";
# exec.created+="zfs jail $name ${datazpool}/freshports/jailed/$WEB_JAIL/cache";
# mount things
# exec.created+="zfs mount ${datazpool}/freshports/$WEB_JAIL/www/freshports";
# exec.created+="zfs mount ${datazpool}/freshports/$WEB_JAIL/www/freshsource";
# unjail and umount so we can get access to the underlying mount points
# when required/
# exec.poststop+="zfs set jailed=off ${datazpool}/freshports/jailed/$WEB_JAIL/cache";
# exec.poststop+="zfs set jailed=off ${datazpool}/freshports/jailed/$WEB_JAIL/cache/categories";
# exec.poststop+="zfs set jailed=off ${datazpool}/freshports/jailed/$WEB_JAIL/cache/commits";
# exec.poststop+="zfs set jailed=off ${datazpool}/freshports/jailed/$WEB_JAIL/cache/daily";
# exec.poststop+="zfs set jailed=off ${datazpool}/freshports/jailed/$WEB_JAIL/cache/general";
# exec.poststop+="zfs set jailed=off ${datazpool}/freshports/jailed/$WEB_JAIL/cache/news";
# exec.poststop+="zfs set jailed=off ${datazpool}/freshports/jailed/$WEB_JAIL/cache/packages";
# exec.poststop+="zfs set jailed=off ${datazpool}/freshports/jailed/$WEB_JAIL/cache/pages";
# exec.poststop+="zfs set jailed=off ${datazpool}/freshports/jailed/$WEB_JAIL/cache/ports";
# exec.poststop+="zfs set jailed=off ${datazpool}/freshports/jailed/$WEB_JAIL/cache/spooling";
# exec.poststop+="zfs umount ${datazpool}/freshports/jailed/$WEB_JAIL/cache";
# exec.poststop+="zfs umount ${datazpool}/freshports/jailed/$WEB_JAIL/cache/categories";
# exec.poststop+="zfs umount ${datazpool}/freshports/jailed/$WEB_JAIL/cache/commits";
# exec.poststop+="zfs umount ${datazpool}/freshports/jailed/$WEB_JAIL/cache/daily";
# exec.poststop+="zfs umount ${datazpool}/freshports/jailed/$WEB_JAIL/cache/general";
# exec.poststop+="zfs umount ${datazpool}/freshports/jailed/$WEB_JAIL/cache/news";
# exec.poststop+="zfs umount ${datazpool}/freshports/jailed/$WEB_JAIL/cache/packages";
# exec.poststop+="zfs umount ${datazpool}/freshports/jailed/$WEB_JAIL/cache/pages";
# exec.poststop+="zfs umount ${datazpool}/freshports/jailed/$WEB_JAIL/cache/ports";
# exec.poststop+="zfs umount ${datazpool}/freshports/jailed/$WEB_JAIL/cache/spooling";
# exec.poststop+="zfs umount ${datazpool}/freshports/$WEB_JAIL/www/freshports";
# exec.poststop+="zfs umount ${datazpool}/freshports/$WEB_JAIL/www/freshsource";
}