All of a sudden domain can not connect to caddy server


(Benjamin Anderson) #1

Hi there :slight_smile:
until yesterday I’ve been running Caddy server without any issues.
In fact when a friend showed me caddy server, I thought wow, thank gawd!

But yesterday something strange happened.

I was attempting to proxy an OWIN Self Hosted Server API Endpoint through Caddy.

Once I realized I needed to do some more work on my API Endpoint I removed the proxy line from the Caddyfile.

Now, my domain does not resolve to my Caddy Server, despite the settings being literally the same as before I experimented with an API endpoints through Caddy.

My question is: By starting and stopping the Caddy Server Process, would this reach some kind of threshold, where Caddy might break due to too many requests for SSL Certs from Let’s Encrypt?

Should I post my Caddyfile?

Unfortunately, I also host a proxy server, and website for my home business, and it is currently down! Uh oh!.

Any help would be greatly appreciated.

I upgraded to the most recent release of Caddy Server yesterday.


(Matt Holt) #2

We’re gonna need some more information. What’s the error message? What’s in your logs (the whole logs)? And yes, please post your entire, unmodified Caddyfile.

This would be a DNS misconfiguration, which is not related to Caddy.

Yes, always follow the recommendations when testing and developing so you don’t run into rate limits.


(Benjamin Anderson) #3

Thank you matt for the quick reply.

I’ll most certainly post my Caddyfile when I return from work.

But, I have a feeling I’ve hit rate limits, and that is the problem.

thanks for the link too, I’ll be sure to place ‘-CA’ in the command line when I start testing endpoints again.

I wonder how long it’ll be down for.


(Matt Holt) #4

If you’ve hit rate limits, there’s nothing you can do with those domains for 1 week. Just have to wait it out.


(Benjamin Anderson) #5

Well, some great news!
I’m not exactly sure what happened but caddy is all of a sudden serving up my index.html (my site).
It must be a ‘ghost in the machine’.

However, my proxy server is not working.

This is a log from when I attempt to access the proxy:

24.114.98.250 - - [11/Sep/2017:17:34:32 -0400] "GET /css/style.css HTTP/2.0" 304 0
24.114.98.250 - - [11/Sep/2017:17:34:32 -0400] "GET /js/jquery.mmenu.min.all.js HTTP/2.0" 304 0
24.114.98.250 - - [11/Sep/2017:17:34:32 -0400] "GET /js/bootstrap.min.js HTTP/2.0" 304 0
24.114.98.250 - - [11/Sep/2017:17:34:32 -0400] "GET /js/svgicons.js HTTP/2.0" 304 0
24.114.98.250 - - [11/Sep/2017:17:34:32 -0400] "GET /js/jquery.js HTTP/2.0" 304 0
24.114.98.250 - - [11/Sep/2017:17:34:32 -0400] "GET /js/scripts.js HTTP/2.0" 200 22216
24.114.98.250 - - [11/Sep/2017:17:34:32 -0400] "GET /css/font-awesome.min.css HTTP/2.0" 200 31000
24.114.98.250 - - [11/Sep/2017:17:34:33 -0400] "GET /css/jquery.mmenu.all.css HTTP/2.0" 200 24058
24.114.98.250 - - [11/Sep/2017:17:34:33 -0400] "GET /css/animate.css HTTP/2.0" 200 55844
24.114.98.250 - - [11/Sep/2017:17:34:33 -0400] "GET /css/bootstrap.min.css HTTP/2.0" 200 99961
24.114.98.250 - - [11/Sep/2017:17:34:34 -0400] "GET /img/StaticSnow.png HTTP/2.0" 304 0
24.114.98.250 - - [11/Sep/2017:17:34:35 -0400] "GET /fonts/fontawesome-webfont.woff?v=4.7.0 HTTP/2.0" 304 0
24.114.98.250 - - [11/Sep/2017:17:34:35 -0400] "GET /emby/Users/Public?val=name HTTP/2.0" 200 16630
24.114.98.250 - - [11/Sep/2017:17:34:36 -0400] "GET /img/background.jpg HTTP/2.0" 200 1239786
24.114.98.250 - - [11/Sep/2017:17:34:37 -0400] "HEAD /img/background@2x.jpg HTTP/2.0" 200 0
24.114.98.250 - - [11/Sep/2017:17:34:37 -0400] "GET /img/background@2x.jpg HTTP/2.0" 304 0
24.114.98.250 - - [11/Sep/2017:17:35:04 -0400] "GET /emby HTTP/2.0" 302 0
24.114.98.250 - - [11/Sep/2017:17:35:05 -0400] "GET /emby/web/index.html HTTP/2.0" 200 2270
24.114.98.250 - - [11/Sep/2017:17:36:11 -0400] "GET /emby/web/index.html HTTP/2.0" 200 2270
24.114.98.250 - - [11/Sep/2017:17:36:26 -0400] "GET /js/jquery.mmenu.min.all.js HTTP/2.0" 304 0
24.114.98.250 - - [11/Sep/2017:17:36:26 -0400] "GET /js/bootstrap.min.js HTTP/2.0" 304 0
24.114.98.250 - - [11/Sep/2017:17:36:26 -0400] "GET /css/style.css HTTP/2.0" 304 0
24.114.98.250 - - [11/Sep/2017:17:36:26 -0400] "GET /js/jquery.js HTTP/2.0" 304 0
24.114.98.250 - - [11/Sep/2017:17:36:26 -0400] "GET /js/svgicons.js HTTP/2.0" 304 0

Also my Caddyfile:

homemediaserver.online  {

    tls xxxxxx@gmail.com
	
    timeouts none

    mailout /mailout {
                
        to              xxxxxx@gmail.com
        subject         "Subscription Request for Home Media Server"
        body           email.txt

        username        "xxxxxx@gmail.com"
        password        "xxxxxx"
        host            smtp.gmail.com
        port            587

        ratelimit_interval 24h
        ratelimit_capacity 100
   }

   proxy /emby localhost:8096 {
	websocket
	transparent
    } 
 
    # Optional security headers
    header / {
	-Server
	Strict-Transport-Security "max-age=31536000;"
	Referrer-Policy "strict-origin"
	X-XSS-Protection "1; mode=block"
	X-Content-Type-Options "nosniff"
	X-Frame-Options "DENY"
    }

	
    # Optional logging
    log EmbyProxy.log

}

I’m not worried about people seeing my domain name here, it’s all behind a Sha1 encrypted login so what ever.

So I wonder why the proxy seems broken? It looks like it’s return 200 OK, but then the proxy times out.


(Benjamin Anderson) #6

I’ll be damned, as I wrote that response, the proxy started working.

Now I’m ever more confused… But back in business, so thanks for the fantastic dev help here!

Great job!


(system) #7

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