Open sdellysse opened 3 days ago
Thank you for creating an issue. Since the ticket doesn't seem to be using one of our templates, we're marking this issue as low priority until further notice.
For more information about the policies for this repository, please read https://github.com/opnsense/plugins/blob/master/CONTRIBUTING.md for further details.
The easiest option to gain traction is to close this ticket and open a new one using one of our templates.
That code you referenced is only a validation to give users feedback that something they configured might collide with what caddy expects.
But caddy is not controlled by that code. I am sure there are a few more configurations that will slip through the cracks.
E.g. if you have another plugin binding ports that Caddy might like to use.
In the Layer 4 module thats included you are able to bind any port that you want, there's no way to validate against all plugins in the system. Caddy will just try to start, and if it can not bind the ports it needs it will fail.
Problem: When
System: Settings: Administration: Web GUI: Protocol
is set toHTTP
, andSystem: Settings: Administration: Web GUI: TCP Port
is set to81
, the caddy server will fail to start. I fixed this by changingSystem: Settings: Administration: Web GUI: Protocol
toHTTPS
, changingSystem: Settings: Administration: Web GUI: TCP Port
to8443
, setSystem: Settings: Administration: Web GUI: Http Redirect
tounchecked
.Expected outcome: when the protocol is
http
and the port is!= 80
, caddy should start.The code that needs to be fixed is somewhere in this block but I haven't had a chance to try to fix it myself: https://github.com/opnsense/plugins/blob/f25a1fa6d54ef53339ab02685ecaf53a8fa5fcbb/www/caddy/src/opnsense/mvc/app/models/OPNsense/Caddy/Caddy.php#L77C1-L94C6