No such site at :80

I have a multi-part host name that I’m trying to route to a port on the same host, so I have a declaration like this:

test.prj.mydomain.com {
    proxy / localhost:32776 {
        transparent
    }
}

and if I connect to mydomain.com:32776 I get the service I expect but when attempting to connect to test.prj.mydomain.com I get the error mentioned in the subject header.

also, thinking it might the multi-part name I tried it with test.mydomain.com but I get the same error…

this is pretty simple, what am I missing?

Are you using autohttps? What Caddy version?

So you’re connecting externally from test.prj.mydomain.com, but internally from mydomain.com:32776?

Is the service you have at :32776 configured to respond to requests for host test.prj.mydomain.com?

You might try a simpler Caddyfile to rule out proxy issues:

test.prj.mydomain.com {
    browse
}

Then load up test.prj.mydomain.com and see if you get a response from Caddy at :80. Logging will also help you here to determine what Caddy’s doing with requests for this site.

v0.9.3 on Ubuntu 16.04. as for whether I’m using autohttps, if I don’t set tls off in a declaration then I guess I am, right? I’m not passing any special parameters to caddy

I figured it out. caddy wasn’t running where I thought it was and was thus reading the wrong config file. thanks for the help guys. it’s now running as expected. yea!

2 Likes

Glad to hear it’s fixed.

To address this specifically, Automatic HTTPS will not provision certificates unless a number of criteria are met. You can break any of these criteria intentionally to stop Caddy from getting LetsEncrypt certificates for the specific site. The list of criteria can be found here - so for example, my.site.com would get a certificate, where my.site.com:80 would not, and neither would http://my.site.com. tls off also works as you noted.

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