1. The problem I’m having:
I am performing a forwarding proxy for my internal network (router) which does not have an https certificate but when I do it this way, HTTP ERROR 502 appers…
Image for problem:
When access the 100.75.1.90:
2. Error messages and/or full log output:
:80 {
route /https* {
reverse_proxy 100.75.1.90 {
header_up Host 100.75.1.90
lb_policy round_robin
lb_try_duration 5s
health_status 200
health_interval 10s
fail_duration 30s
transport http {
tls_insecure_skip_verify
}
}
}
log {
output file /var/log/caddy/access.log
}
log {
output file /var/log/access.log
}
}
3. Caddy version:
v2.7.6
4. How I installed and ran Caddy:
Via apt-get
a. System environment:
Ubuntu 22.04 x64_86
b. Command:
systemctl restart caddy
d. My complete Caddy config:
GNU nano 6.2 /etc/caddy/Caddyfile
# The Caddyfile is an easy way to configure your Caddy web server.
#
# Unless the file starts with a global options block, the first
# uncommented line is always the address of your site.
#
# To use your own domain name (with automatic HTTPS), first make
# sure your domain's A/AAAA DNS records are properly pointed to
# this machine's public IP, then replace ":80" below with your
# domain name.
:80 {
route /https* {
reverse_proxy 100.75.1.90 {
header_up Host 100.75.1.90
lb_policy round_robin
lb_try_duration 5s
health_status 200
health_interval 10s
fail_duration 30s
transport http {
tls_insecure_skip_verify
}
}
}
log {
output file /var/log/caddy/access.log
}
log {
output file /var/log/access.log
}
}
5. Links to relevant resources:
None