Bug 241481

Summary: www/caddy allow options in rc file
Product: Ports & Packages Reporter: courtney.hicks1
Component: Individual Port(s)Assignee: Dmitry Marakasov <amdmi3>
Status: Closed Overcome By Events    
Severity: Affects Only Me CC: fabian.freyer, meta
Priority: --- Flags: bugzilla: maintainer-feedback? (fabian.freyer)
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
Revised caddy rc file none

Description courtney.hicks1 2019-10-25 00:03:02 UTC
Created attachment 208590 [details]
Revised caddy rc file

I just started using Caddy, and encountered an error where for whatever reason, one of my servers was failing the tls-alpn challenge when getting a cert from Let's Encrypt. After digging I found that the solution was to add -disable-tls-alpn-challenge to the command_args variable in /usr/local/etc/rc.d/caddy, so the command was like this:

command_args="-p ${pidfile} /usr/bin/env ${caddy_env} ${procname} -disable-tls-alpn-challenge -cpu ${caddy_cpu} -log stdout -conf ${caddy_config_path} -agree -email ${caddy_cert_email} < /dev/null >> ${caddy_logfile} 2>&1"

Can we allow an option so users can set something like this from the /etc/rc.conf file? I made some modifications to the caddy rc file and attached it.

Thank you,

Courtney
Comment 1 Dmitry Marakasov freebsd_committer freebsd_triage 2021-02-19 00:12:34 UTC
If this is still relevant, I think you can use caddy_extra_flags for the purpose now.