I'm running Caddyserver _v2.0.0-beta12 h1:LZnXOGDr1SbeJNyln8Xc/hXjWCa/a9qFpCbWt2iwJPw=_ and setting:
{
https_port 9443
}
at the very top of my Caddyfile doesn't seem to have any effect. Caddy still binds to 443 when I start it. Everything else works perfectly in this file. No weird messages are logged in the stdout. It just looks like the line is ignored.
The feature is documented here.
Hey @edgarogh what is your full Caddyfile (no changes or redactions please)?
My Caddyfile was really huge, so I did modify it to - potentially - narrow the problem down but it is still there.
Here's the full (modified) file content (which still doesn't bind to 9443 on my server):
{
http_port 80
https_port 9443
email [email protected]
}
edgarogh.fr {
file_server {
root static_root
}
}
_If you really want the full file (maybe there is some kind of broken cache from previous configs ?), while the file doesn't contain sensitive data at all, I'd still prefer to send it privately or PGP it._
@edgarogh Indeed, I'm unable to reproduce your issue.
(Unfortunately I can't give free private support, so the issue tracker will have to do.)
caddy adapt gives this output:
{
"apps": {
"http": {
"http_port": 80,
"https_port": 9443,
"servers": {
"srv0": {
"listen": [
":9443"
],
"routes": [
{
"match": [
{
"host": [
"edgarogh.fr"
]
}
],
"handle": [
{
"handler": "subroute",
"routes": [
{
"handle": [
{
"handler": "file_server",
"hide": [
"/Users/matt/Desktop/Caddyfile_3042"
],
"root": "static_root"
}
]
}
]
}
],
"terminal": true
}
]
}
}
},
"tls": {
"automation": {
"policies": [
{
"management": {
"email": "[email protected]",
"module": "acme"
}
}
]
}
}
}
}
Which looks correct, and the server listens on :9443.
Make sure you're using the config you think you're using, I guess?
I'm 100% sure that the correct file is being used. I will investigate more on my own, I'll update if I find something. This is not a professional project so I don't really have any emergency.
Thanks for answering.
Thanks for trying to narrow it down. Let me know what you find, since I'd really like to make sure we get that right!
OK, I feel really bad about that. The irreproducibility tipped me off. It was just a problem with the version I was using. I remembered updating caddy quite recently so I didn't expect a lot of changes to have been released since (especially for a specific bug like this), but it's great to see how fast caddy evolves ! :smile:
TLDR for anyone having the same problem: _update caddy_
Great, thanks for double-checking!
Most helpful comment
OK, I feel really bad about that. The irreproducibility tipped me off. It was just a problem with the version I was using. I remembered updating caddy quite recently so I didn't expect a lot of changes to have been released since (especially for a specific bug like this), but it's great to see how fast caddy evolves ! :smile:
TLDR for anyone having the same problem: _update caddy_