domain with www does not work for Caddy server

I’m using Caddy as a reverse proxy server that points to a docker container that runs web service at port 8181. The domain abc.com works, but www.abc.com does not work. I wonder where might be wrong:

Caddyfile:

abc.com {
    proxy / localhost:8181
}

I have an A record for www.abc.com that points to the IP address of the server.

Hi @rcholic,

The sites abc.com and www.abc.com both appear to be working from my end, both served by Apache, both appear to redirect to https://abc.go.com/.

Do you still need help with these sites?

1 Like

actually, I was using abc.com as an example domain, I don’t own it.

My real domain name is streamusb.com, but www.streamusb.com does not work

thanks

By the looks of your Caddyfile example I’m going to guess that you haven’t added the www.streamusb.com domain to your configuration.

So:

streamusb.com,
www.streamusb.com {
    proxy / localhost:8181
}

Or if you only wanted www:

www.streamusb.com {
    proxy / localhost:8181
}

streamusb.com {
    redir https://www.streamusb.com{uri}
}
1 Like

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