I use Caddy as reverse proxy for Zammad on Debian, not nginx or apache2. Unfortunately, the later are defined as dependency in the .deb package ( ngnix | apache2 ). So even if Caddy is installed, ngnix will be installed when installing Zammad, and both will fight for the ports 80 and 443.
Disabling ngnix and restarting Caddy fix this:
systemctl stop nginx ; systemctl disable nginx ; systemctl restart caddy
However it has to be repeated after every update.
Another workaround is to remove the dependency in this hacky way:
apt update
gawk -i inplace -v INPLACE_SUFFIX=.bak '/Depends:.*nginx \| apache2/ {gsub(/ *nginx \| apache2,/, "")} {print}' /var/lib/dpkg/status
It has the advantage of preventing the installation of nginx or allowing its deinstallation if it installed:
dpkg -r nginx nginx-common
But it is still a workaround.
Could you please add Caddy as option for the web server:
nginx | apache2 | caddy
Or alternatively remove the dependencies completely and let the users install it by their own, like for other applications. Zammad is the only application I know that has dependencies on specific web servers. That creates unexepected side effects, like in my case or After Zammad upgrade nginx starts instead of apache2 - #5 by dko-strd