I’m setting up caddy as a reverse proxy in front of nginx to serve a wordpress website. Caddy and nginx is located on different server.
The website is working. However, when I try to enter an url like http://example.com/wp-admin (which is exist folder), instead of going to the wp-admin page (forwarding to wp-login.php), caddy display an error “refused to connect” with address showing http://example.com:port/wp-admin/.
Same problem if trying to enter other exist folder like wp-content…
My Caddyfile is as following:
.example.com {
tls me@example.com {
dns cloudflare
key_type rsa4096
}
}
example.com:80 {
errors /var/log/caddy/errors.log
gzip { level 9 }
proxy / xxx.xxx.xxx.xxx:port {
websocket
transparent
}
}
Is there anything I did wrong here? Sorry I’m very new to this reverse proxy. Also, why did the error page showing the forwarding port here? Would this affect the security? How can I stop caddy to showing the forwarding port?