caddy build

Опубликовано: 2018-06-11

Info

quick-easy-install-golang-1-7-on-ubuntu-16-04

compile something

Base install

Add source code

test build


Plugins

how-to-host-a-website-with-caddy-on-ubuntu-16-04

add ssl plugins

dnsproviders ~/caddy/src/github.com/mholt/caddy/caddy# vim caddymain/run.go
...
import (
"bufio"
"errors"
"flag"
"fmt"
"io"
"io/ioutil"
"log"
"os"
"path/filepath"
"runtime"
"strconv"
"strings"

"github.com/google/uuid"
"github.com/klauspost/cpuid"
"github.com/mholt/caddy"
"github.com/mholt/caddy/caddytls"
"github.com/mholt/caddy/telemetry"
"github.com/xenolf/lego/acmev2"
"gopkg.in/natefinch/lumberjack.v2"

_ "github.com/mholt/caddy/caddyhttp" // plug in the HTTP server type
// This is where other plugins get plugged in (imported)

_ "github.com/caddyserver/dnsproviders/digitalocean"
_ "github.com/caddyserver/dnsproviders/cloudflare"
)
...
~/caddy/src/github.com/mholt/caddy/caddy# export GOROOT=/usr/local/go; export GOPATH=$HOME/caddy; export PATH=$PATH:$GOROOT/bin:$GOPATH/bin; /usr/local/go/bin/go run build.go
~/caddy/src/github.com/mholt/caddy/caddy# ./caddy -plugins
Server types:
http

Caddyfile loaders:
short
flag
default

Other plugins:
http.basicauth
http.bind
http.browse
http.errors
http.expvar
http.ext
http.fastcgi
http.gzip
http.header
http.index
http.internal
http.limits
http.log
http.markdown
http.mime
http.pprof
http.proxy
http.push
http.redir
http.request_id
http.rewrite
http.root
http.status
http.templates
http.timeouts
http.websocket
on
tls
tls.dns.cloudflare
tls.dns.digitalocean
tls.storage.file


git plugin

caddy-git
export GOPATH=/root/caddy; /usr/local/go/bin/go get github.com/abiosoft/caddy-git

_ "github.com/abiosoft/caddy-git"

~/caddy/src/github.com/mholt/caddy/caddy# export GOROOT=/usr/local/go; export GOPATH=$HOME/caddy; export PATH=$PATH:$GOROOT/bin:$GOPATH/bin; /usr/local/go/bin/go run build.go
~/caddy/src/github.com/mholt/caddy/caddy# ./caddy -plugins
Server types:
http

Caddyfile loaders:
short
flag
default

Other plugins:
http.basicauth
http.bind
http.browse
http.errors
http.expvar
http.ext
http.fastcgi
http.git
http.gzip
http.header
http.index
http.internal
http.limits
http.log
http.markdown
http.mime
http.pprof
http.proxy
http.push
http.redir
http.request_id
http.rewrite
http.root
http.status
http.templates
http.timeouts
http.websocket
on
tls
tls.dns.cloudflare
tls.dns.digitalocean
tls.storage.file

root@intenv-fra1-node1:~/caddy/src/github.com/mholt/caddy/caddy# ./caddy -version
Caddy 0.11.0 (+e54dfa4 Mon Jun 11 11:20:04 UTC 2018) (unofficial)
1 file changed, 4 insertions(+)
caddy/caddymain/run.go

© Все права защищены 2011-2024