1. Caddy version:
v2.6.2 h1:wKoFIxpmOJLGl3QXoo6PNbYvGW4xLEgo32GPBEjWL8o=
2. How I installed, and run Caddy:
Using Caddy official documentation
a. System environment:
Ubuntu 22.04.1 LTS (GNU/Linux 5.15.0-58-generic x86_64)
b. Command:
caddy stop
c. Service/unit/compose file:
Paste full file contents here.
Make sure backticks stay on their own lines,
and the post looks nice in the preview pane.
d. My complete Caddy config:
{
"logging": {
"logs": {
"default": {
"exclude": [
"http.log.access.logFiltered",
"http.handlers.mercure"
]
},
"logFiltered": {
"level": "ERROR",
"include": [
"http.log.access.logFiltered"
]
}
}
},
"apps": {
"http": {
"servers": {
"srv0": {
"listen": [
":443"
],
"routes": [
{
"match": [
{
"host": [
"test.domainname.com"
]
}
],
"handle": [
{
"handler": "subroute",
"routes": [
{
"handle": [
{
"handler": "subroute",
"routes": [
{
"handle": [
{
"cors_origins": [
"https://socket.domainname.com"
],
"handler": "mercure",
"publish_origins": [
"*"
],
"publisher_jwt": {
"key": "!ChangsseMe!"
},
"subscriber_jwt": {
"key": "!ChansssgeMe!"
},
"transport_url": "local://local",
"subscriptions": true,
"write_timeout": 0
}
]
},
{
"handle": [
{
"handler": "subroute",
"routes": [
{
"handle": [
{
"handler": "metrics"
}
]
}
]
}
],
"match": [
{
"path": [
"/metrics"
]
}
]
},
{
"handle": [
{
"handler": "static_response",
"status_code": 200
}
],
"match": [
{
"path": [
"/healthz"
]
}
]
},
{
"handle": [
{
"body": "Not Found",
"handler": "static_response",
"status_code": 404
}
]
}
]
},
{
"handler": "file_server",
"hide": [
"/etc/caddy/CaddyFile.json"
]
}
]
}
]
}
],
"terminal": true
}
],
"logs": {
"logger_names": {
"mercure.work2.domainname.com": "logFiltered"
}
}
}
}
}
}
}
3. The problem I’m having:
When I execute the command “caddy stop”, it gives an API error. Caddy restart or even Caddy Upgrade takes ages to get the process done, in the meantime, I have to cancel the operation and using Linux systems service to stop the caddy.