This port will build a customized version of the caddy webserver
using plugins of your choice. You will need to rebuild this port
manually if one of your plugins gets updated.
Caddy is a high-performance webserver with a simple config format,
out-of-the-box HTTP/3 support, and automatic transparent ACME
certificate provisioning.
NOTE: THIS PORT BYPASSES EVERY SINGLE ONE OF FREEBSD'S CHECKSUM-
BASED DISTFILE TAMPERING DETECTION MECHANISMS. USE THIS AT YOUR
OWN PERIL (though the peril is exactly the same as using the
xcaddy port).
To make this work:
1) In /usr/local/etc/poudriere.conf, add the following:
ALLOW_NETWORKING_PACKAGES="caddy-custom"
You can skip this step if you're not building in poudriere.
2) Put your plugin list into make.conf (or
/usr/local/etc/poudriere.conf/make.conf):
.if ${.CURDIR:M*/www/caddy-custom*}
CADDY_CUSTOM_PLUGINS= github.com/caddy-dns/rfc2136 github.com/greenpau/caddy-security
.endif
If you have any other xcaddy build flags you want to set, put
them in XCADDY_ENV.
3) Profit
*/*: Add CPE declaration to 617 ports
Improve CPE coverage in the ports tree to help security scanners match
software with vulnerability reports.
Matched project and download URLs from port metadata against references
in the official NVD CPE dictionary. Reviewed product identities to
distinguish applications from related components and similarly named
projects.
Sponsored by: OTTRIA
Differential Revision: https://reviews.freebsd.org/D61941
www/caddy: Update to 2.11.8
This contains numerous fixes to handling broken-by-design scenarios,
such as PHP. All users should update, especially if caddy drives a
php_fastcgi backend.
Read the Changes for details.
Changes: https://github.com/caddyserver/caddy/releases/tag/v2.11.8
www/caddy-custom: Fix build with BUILD_AS_NON_ROOT=yes
Two fixes:
1. Establish a GOCACHE and GOPATH for BUILD_AS_NON_ROOT so it doesn't
try to use /nonexistant/go (patch by Brad Ackerman).
2. Reset PORTREVISION (Vick Khera). I added a note in caddy/Makefile
so maybe I'll remember in the future.
PR: 295182
go: Bump go124-dependent ports
Earlier I bumped the default Go to 1.24. Ports that specify a lower
version will still build with those lower version (for now), so they
don't need a bumping. Instead I'm bumping anything that (now) has go124
as a dependency.
www/caddy, www/caddy-custom: Fix rc(8) instructions
I had 'service enable caddy' instead of 'service caddy enable' in
caddy.in, because I get it wrong so often that I had to write a
wrapper service() function in my shell.
Ludovic submitted a patch for this 5 months ago, but it went into
the same cerebral black hole as the order of service arguments.
PR: 280127
Reported by: Ludovic Hirlimann
www/caddy{,-custom}: chown caddy.log to caddy user/group
We have set caddy.log to root:wheel, which works for the default case
of running caddy as root.
When caddy is run as a non-root users, caddy.log can't actually be
written to. Instead, chown caddy.log to the caddy user/group so that
it can be written to.
PR: 276150
www/caddy{,-custom}: Fix start/stop with admin API disabled
Caddy largely relies on the admin API for state control, like
start/stop/reload. However, the admin API endpoints are inherently
a security risk.
Although the admin API is enabled by default, many users may choose
to disable it. However, the rc(8) script then needs an alternative
approach to controlling the daemon.
We already sortof supported signal-based control, but it didn't always
work, because there are multiple error messages that indicate that
the admin API is disabled (and none of them actually say that in a clear
way).
This commit fixes start and stop with the admin API disabled. The
reload command (and reloadssl) still require the admin API to be
enabled and will fail if the admin API is disabled.
PR: 255106
Submitted by: scf
www/caddy{,-custom}: Fix startup with JSON configuration
Caddy supports a wide number of configuration file formats, including
its built-in "Caddyfile" format, and the "native" format is JSON.
When anything other than the native JSON format is used, caddy needs to
be passed the --adapter [formatname] flag (though it automatically
handles the case where the config filename is Caddyfile). However, as
JSON is the native format, there is no "json" adapter.
The added patch drops the --adapter flag when caddy_adapter is "json".
PR: 270120
www/caddy-custom: Add port
This port allows you to build a version of the caddy webserver
using whichever plugins you desire. To do so, it uses the
official build mechanism, xcaddy (from the www/xcaddy port).
However, this requires network access.
To use this port, you'll need to add
ALLOW_NETWORKING_PACKAGES="caddy-custom" to your poudriere.conf.
Make really really REALLY sure you understand the implications
of doing this. If you use xcaddy, then there really isn't any
other actual implication, but I'm using my scary voice to
discourage people from shooting themselves in the foot.