How to config nginx unit to Caddyfile

fastcgi / http://127.0.0.1:8300 php

is 502

    proxy / http://127.0.0.1:8300 {
        transparent
        websocket
        insecure_skip_verify
    }

is 500

It work in nginx but not work in caddy

Hi @lun,

I don’t know what 520 is. It’s not a standard HTTP status. Cloudflare use it to indicate the origin server sent something weird/unexpected.

Status 500 is “internal server error” (it doesn’t get any more descriptive). Something went wrong upstream.

I’d wager that proxy is the correct way to access it, but I’m wondering if there’s some special protocol nginx uses to talk to Unit. I’ve only ever seen it configured with nginx, never with Apache or HAProxy or anything else. It might not be designed to work with other web servers.

I’m sorry,is 502,but unit is work on :8300 and unit can work on nginx.And php can work too.
So I think maybe it’s the communication configuration between caddy and unit.

In your Caddyfile fastcgi directive, what happens if you remove http:// in front of 127.0.0.1:8300 ?

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