Trying to add a reverse proxy

1. The problem I’m having:

I am trying to add a url with to hit server IP with the reverse-proxy command,

2. Error messages and/or full log output:

sudo caddy reverse-proxy --from unifi.site.org --to x.x.x.x:8443
2025/05/16 12:12:58.723 WARN    admin   admin endpoint disabled
2025/05/16 12:12:58.723 INFO    http.auto_https server is listening only on the HTTPS port but has no TLS connection policies; adding one to enable TLS {"server_name": "proxy", "https_port": 443}
2025/05/16 12:12:58.723 INFO    http.auto_https enabling automatic HTTP->HTTPS redirects        {"server_name": "proxy"}
2025/05/16 12:12:58.723 INFO    tls.cache.maintenance   started background certificate maintenance      {"cache": "0xc0002ce880"}
2025/05/16 12:12:58.724 INFO    http    enabling HTTP/3 listener        {"addr": ":443"}
2025/05/16 12:12:58.724 INFO    http.log        server running  {"name": "proxy", "protocols": ["h1", "h2", "h3"]}
Error: loading new config: http app module: start: listening on :80: listen tcp :80: bind: address already in use

3. Caddy version:

←
caddy version is v2.10.0
β†’

4. How I installed and ran Caddy:

←
sudo apt install -y debian-keyring debian-archive-keyring apt-transport-https curl
curl -1sLf β€˜https://dl.cloudsmith.io/public/caddy/stable/gpg.key’ | sudo gpg --dearmor -o /usr/share/keyrings/caddy-stable-archive-keyring.gpg
curl -1sLf β€˜https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt’ | sudo tee /etc/apt/sources.list.d/caddy-stable.list
sudo apt update
sudo apt install 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:

←

disable redirects

{
auto_https disable_redirects
}

unifi reverse proxy

unifi.site.org {
reverse_proxy x.x.x.x:8443
}

β†’

PASTE OVER THIS, BETWEEN THE ``` LINES.
Please use the preview pane to ensure it looks nice.

5. Links to relevant resources:

The error message is quite self-explanatory: something else is already occupying the port 80 on the computer where you’re trying to run Caddy.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.