1. Caddy version (caddy version
):
v2.4.6
2. How I run Caddy:
a. System environment:
On a ubuntu 20.04 VM. A fresh install using the setup steps outlined at Install — Caddy Documentation
b. Command:
vi Caddyfile
caddy fmt --overwrite Caddyfile
caddy adapt
caddy reload
c. Service/unit/compose file:
Not using Docker. Was a installation straght onto the OS.
d. My complete Caddyfile or JSON config:
localhost:3000
reverse_proxy {
to 192.168.0.210:80
}
3. The problem I’m having:
gck@caddy-1:~$ curl -v http://192.168.0.239:3000/
- Trying 192.168.0.239:3000…
- TCP_NODELAY set
- Connected to 192.168.0.239 (192.168.0.239) port 3000 (#0)
GET / HTTP/1.1
Host: 192.168.0.239:3000
User-Agent: curl/7.68.0
Accept: /
- Mark bundle as not supporting multiuse
- HTTP 1.0, assume close after body
< HTTP/1.0 400 Bad Request
<
Client sent an HTTP request to an HTTPS server. - Closing connection 0
gck@caddy-1:~$ curl -v localhost:3000
- Trying 127.0.0.1:3000…
- TCP_NODELAY set
- Connected to localhost (127.0.0.1) port 3000 (#0)
GET / HTTP/1.1
Host: localhost:3000
User-Agent: curl/7.68.0
Accept: /
- Mark bundle as not supporting multiuse
- HTTP 1.0, assume close after body
< HTTP/1.0 400 Bad Request
<
Client sent an HTTP request to an HTTPS server. - Closing connection 0
4. Error messages and/or full log output:
I have a local wordpress server (192.168.0.210) which is serving a page on port 80. I want to connect Caddy as a proxy for this. I will then expose the proxy via my firewall. I will then update the configuration to use the https/443 ports.
5. What I already tried:
I have tried rebuilding and various permutations of config. I just can’t get the reverse proxy to work.
I cannot get a response other than an HTTPS error.
I have searched and searched for some help with this.
6. Links to relevant resources:
Thank you!!!