-
Hi all, I am having issues with my caddy file configuration and I don't get it how to fix it, already tried with help from Gemini and ChatGPT4o but no luck. The error I am seeing on the logs is: When I do a "sudo docker ps" I shows caddy restarting. CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES This is how my Caddy File looks like: `# Main domain with secure protocols Management domain configurationsubdomain.domain.com { HTTP to HTTPS redirectionhttp:// { Global error handling for 404 errorshandle_errors { Global fallback for unspecified routes:80, :443 { Thanks a lot for your help. I am sorry if I did something silly, I am not a Linux person and I am getting around by asking to ChatGPT but this one seems to be a tough cookie. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
The following post shares the paths I had to take to fix this issue. Thanks Teon for helping me on the Matrix support channel. Hope this helps anyone facing a similar issue: Caddy Docker restarting in loop without letting me see any web interface of DefguardWhile trying to deploy Defguard on a Debian 12 VM running in Proxmox, I was having the Caddy docker constantly restarting. When checking the logs I was seeing this: Error: adapting config using caddyfile: syntax error: unexpected token '404', expecting '}', at /etc/caddy/Caddyfile:15 import chain: [''] Issue 2: Caddy Configuration Causing Service to RestartProblem: After setting up Defguard on a Debian 12 VM, the Caddy service responsible for reverse proxying was repeatedly restarting. Accessing the web interface resulted in seeing the internal routers home page instead of the intended Defguard interface. Symptoms: https://admin.example.com { :80 { Resolution: https://admin.example.com { :80 { Port Forwarding Configuration: Verified the port forwarding rules on the internal router to ensure ports 80 and 443 were forwarded to the internal IP address of the VM running Defguard. Summary I have created a non official GPT to help specifically on DefGuard topics this is how I got to the solution, feel free to use it: https://chatgpt.com/g/g-uAJiWwPZD-defguard-assistant-not-official |
Beta Was this translation helpful? Give feedback.
The following post shares the paths I had to take to fix this issue. Thanks Teon for helping me on the Matrix support channel. Hope this helps anyone facing a similar issue:
Caddy Docker restarting in loop without letting me see any web interface of Defguard
While trying to deploy Defguard on a Debian 12 VM running in Proxmox, I was having the Caddy docker constantly restarting. When checking the logs I was seeing this:
Error: adapting config using caddyfile: syntax error: unexpected token '404', expecting '}', at /etc/caddy/Caddyfile:15 import chain: ['']
After reinstalling everything again with the one line script with the correct docker version installed as recommended by Teon. I was h…