Caddy 安装和反代

3 min read

Caddy Install

yum install yum-plugin-copr
yum copr enable @caddy/caddy
yum install caddy

Make a Caddy file

touch Caddyfile

Caddy file content

wxapp.test.com {
    reverse_proxy localhost:9999 {
        flush_interval 1s
        buffer_responses
        max_buffer_size 4000
    }

    log {
        output file /var/log/access.log {
            roll_size 1gb
            roll_keep 5
            roll_keep_for 720h
        }
    }
}

just run

Caddy run