Skip to content

Reverse proxy with Caddy

xBotRaid edited this page Mar 2, 2019 · 2 revisions

Prerequisites

  1. Caddy installed and running
  2. GitBucket running on some PORT (the default is 8080). For easier config use also the prefix --prefix=gitbucket.
  3. Know the DOMAIN you want GitBucket to be run on.

Configuration

Add the following to your Caddy config file:

DOMAIN {
    root /srv/site/www
    gzip
    log  /var/logs/sites/access.log
    proxy /gitbucket localhost:PORT {
        transparent
    }
}

Notes

Besides the extremely simple configuration, the main advantage of Caddy is the the automatic SSL certificate handling https://caddyserver.com/features .

To run Caddy as a systemd service, follow https://github.com/mholt/caddy/tree/master/dist/init/linux-systemd

You can’t perform that action at this time.