1. Caddy version (caddy version
):
v2.5.1
2. How I run Caddy:
On a windows machine, multiple interfaces, each of which should be serving exclusively one website (static test for now as proof of concept).
a. System environment:
Windows 10
b. Command:
caddy run
c. Service/unit/compose file:
N/A
d. My complete Caddyfile or JSON config:
192.168.0.106 {
respond "Hello, interface1!"
}
192.168.0.176 {
respond "Hello, interface2!"
}
3. The problem I’m having:
I am looking to use Caddy to disambiguate requests coming into an API. The network this needs to operate in is somewhat frustrating in that the API will handle requests on behalf of multiple parties, but the only information I will receive regarding who the request is for is the IP it gets sent to (I will be running many interfaces on one machine). The network in question does not use SNI, and as far as I can find out is using HTTP/1.0 and will not send Host
headers.
I’ve tried this using the above configuration, but I cannot get a reply when asking the server:
openssl s_client -connect 192.168.0.106:443
GET / HTTP/1.0
I cannot find anything regarding whether Caddy even supports HTTP/1.0, and if it does if the above scenario is possible to achieve.
4. Error messages and/or full log output:
GET / HTTP/1.0
HTTP/1.0 200 OK
Server: Caddy
Date: Wed, 25 May 2022 07:21:53 GMT
Content-Length: 0
closed
5. What I already tried:
I’ve looked at the bind
directive, which seems to at least restrict the interface. It still returns content-length: 0
on HTTP/1.0
requests though.