New2Niu
(New2 Niu)
September 13, 2023, 11:23am
1
1. The problem I’m having:
I want to set app http1.1 in caddyfile, like this:
example.com:8445 {
# expect example.com http1.1, how to config
respond "Hello, world!!"
}
Global options will effect all app, but i just want to set one.
{
debug
servers {
protocols h1
}
}
2. Error messages and/or full log output:
PASTE OVER THIS, BETWEEN THE ``` LINES.
Please use the preview pane to ensure it looks nice.
3. Caddy version:
4. How I installed and ran Caddy:
a. System environment:
b. Command:
PASTE OVER THIS, BETWEEN THE ``` LINES.
Please use the preview pane to ensure it looks nice.
c. Service/unit/compose file:
PASTE OVER THIS, BETWEEN THE ``` LINES.
Please use the preview pane to ensure it looks nice.
d. My complete Caddy config:
PASTE OVER THIS, BETWEEN THE ``` LINES.
Please use the preview pane to ensure it looks nice.
5. Links to relevant resources:
If you want servers global options to only apply to one server, you need to specify a listener address that matches those sites. See the docs, it explains how that works.
You didn’t share your full config so I can’t accurately recommend a solution because it will be affected by whatever else is in your config.
Please completely fill out the help topic template, as per the forum rules. We can’t help otherwise.
New2Niu
(New2 Niu)
September 14, 2023, 2:23am
3
a.example.com:443 { # expect http1.1
bind 10.1.1.1
respond "Hello, world!!"
}
b.example.com:443 { # expect http2
bind 10.1.1.1
respond "Hello, world!!"
}
I want to a.example.com http1.1, and b.example.com http2. a.example.com and b.example.com bind the same IP.
See this article: Http3 Demo | 萌え豚's Blog
You can use tls > alpn
to set the supported protocols in the TLS handshake.
system
(system)
Closed
October 14, 2023, 5:46am
6
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.