Reverse Proxy for Chevereto

I’ve got Caddy up and running via docker, and am successfully reverse proxying a few services also running in docker. The one service I’m having trouble with is Chevereto. Whenever I try to access it, it just times out, and I get a 502 error. I’ve previously been able to proxy this successfully with NIGINX. I’ve only found one post related to Chevereto, but no solution.

Here are the relevant bits of my config:

Caddyfile

pics.stalepeep.com {
  #chevereto via docker
    proxy / 192.168.1.2:8080 {
        transparent
    }
}

Anyone out there successfully proxying Chevereto? I am sure I am missing something simple…

Hi @mikeg1130, welcome to the Caddy community.

What do you get when you run curl -ILX GET 192.168.1.2:8080 on the Caddy host?

Thanks for the reply. Here is the output

HTTP/1.1 301 Moved Permanently
Date: Thu, 18 Apr 2019 03:48:12 GMT
Server: Apache/2.4.25 (Debian)
X-Powered-By: PHP/7.2.11
Set-Cookie: PHPSESSID=90f878026b18eb7ecbf7114fcdd0dc08; path=/
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate
Pragma: no-cache
Location: http://192.168.1.2:8080/login
Content-Length: 0
Content-Type: text/html; charset=utf-8

HTTP/1.1 200 OK
Date: Thu, 18 Apr 2019 03:48:12 GMT
Server: Apache/2.4.25 (Debian)
X-Powered-By: PHP/7.2.11
Set-Cookie: PHPSESSID=81171a70fd01edb878f92f4c06c997e6; path=/
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate
Pragma: no-cache
Vary: Accept-Encoding
Transfer-Encoding: chunked
Content-Type: text/html; charset=utf-8

I’ll admit, I’m not sure what it should look like

Looks fine, actually. The upstream server is sending good responses.

Add log stdout and errors stdout (or replace stdout with the path to some log file if you like), run Caddy again, try and provoke the 502 error, and post the log output. There should be a log entry there, hopefully to explain the 502.

Thanks Whitestrake. This helped me figure it out. I forgot to open the port on the firewall! Once I added the rule, worked like a charm, Totally unrelated to Chevereto after all.

log

REDACTED - - [18/Apr/2019:04:15:15 +0000] "GET / HTTP/2.0" 502 16

errors

18/Apr/2019:04:15:15 +0000 [ERROR 502 /] dial tcp 192.168.1.2:8080: i/o timeout
1 Like

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