|
Lines 6-21
To enable caddy:
Link Here
|
| 6 |
|
6 |
|
| 7 |
- Edit %%ETCDIR%%/Caddyfile |
7 |
- Edit %%ETCDIR%%/Caddyfile |
| 8 |
See https://caddyserver.com/docs/ |
8 |
See https://caddyserver.com/docs/ |
| 9 |
- Add caddy_enable="YES" to /etc/rc.conf |
9 |
- Add mac_portacl_load="YES" to /boot/loader.conf |
|
|
10 |
- Run 'kldload mac_portacl' |
| 11 |
- To /etc/sysctl.conf add: |
| 12 |
net.inet.ip.portrange.reservedhigh=0 |
| 13 |
security.mac.portacl.rules="uid:80:tcp:80,uid:80:tcp:443" |
| 14 |
- Run 'service sysctl reload' |
| 15 |
- Run 'sysrc caddy_enable="YES"' |
| 10 |
|
16 |
|
| 11 |
%%PREFIX%%/etc/rc.d/caddy has the following defaults: |
17 |
%%PREFIX%%/etc/rc.d/caddy has the following defaults: |
| 12 |
|
18 |
|
| 13 |
- Server log: /var/log/caddy/caddy.log |
19 |
- Server log: /var/log/caddy/caddy.log |
| 14 |
(runtime messages, NOT an access.log) |
20 |
(runtime messages, NOT an access.log) |
| 15 |
- Automatic SSL certificate storage: /var/db/caddy/data/caddy/ |
21 |
- Automatic SSL certificate storage: /var/db/caddy/data/caddy/ |
| 16 |
- Runs as root:wheel (you can run as another user, like www, |
22 |
- Runs as www:www (requires mac_portacl(4) to allow caddy to bind to |
| 17 |
but caddy will be unable to bind to low-numbered ports, |
23 |
privileged ports 80 and 443) |
| 18 |
including 80 and 443) |
|
|
| 19 |
|
24 |
|
| 20 |
INSTALL |
25 |
INSTALL |
| 21 |
} |
26 |
} |
|
Lines 36-41
The default locations for caddy runtime files have changed!
Link Here
|
| 36 |
|
41 |
|
| 37 |
You can change these defaults. See %%PREFIX%%/etc/rc.d/caddy |
42 |
You can change these defaults. See %%PREFIX%%/etc/rc.d/caddy |
| 38 |
|
43 |
|
|
|
44 |
UPGRADE |
| 45 |
} |
| 46 |
{ |
| 47 |
type: upgrade |
| 48 |
maximum_version: 2.7.3_1 |
| 49 |
message: <<UPGRADE |
| 50 |
Caddy now runs as www:www by default instead of root:wheel |
| 51 |
|
| 52 |
To enable caddy to continue to bind to port 80 and 443, it is |
| 53 |
recommended to use mac_portacl(4): |
| 54 |
|
| 55 |
- Add mac_portacl_load="YES" to /boot/loader.conf |
| 56 |
|
| 57 |
- Run 'kldload mac_portacl' |
| 58 |
|
| 59 |
- To /etc/sysctl.conf add: |
| 60 |
|
| 61 |
net.inet.ip.portrange.reservedhigh=0 |
| 62 |
security.mac.portacl.rules="uid:80:tcp:80,uid:80:tcp:443" |
| 63 |
|
| 64 |
- Run 'service sysctl reload' |
| 65 |
|
| 66 |
- Alter ownership on caddy runtime files: |
| 67 |
|
| 68 |
chown -r www:www /var/db/caddy /var/log/caddy /var/run/caddy |
| 69 |
|
| 70 |
Other changes may be necessary depending on your exact caddy |
| 71 |
configuration. |
| 72 |
|
| 73 |
To continue running caddy as root, set caddy_user and caddy_group in |
| 74 |
/etc/rc.conf |
| 75 |
|
| 39 |
UPGRADE |
76 |
UPGRADE |
| 40 |
} |
77 |
} |
| 41 |
] |
78 |
] |