@marcel91200 / caddy Mirror · read-only / commits / 6cbd9373
Fork 0

Fast and extensible multi-platform HTTP/1-2-3 web server with automatic HTTPS

Mirrored from https://github.com/Slazee/caddy.git

Synced Nov 14, 05:15 UTC

Minor tweaks

Matthew Holt committed Mar 13, 2020 at 13:02 UTC 6cbd93736fcd2e202fb4d5cfc3f9dd45b6121b0b
7 files changed +23 -17
README.md
+2 -2
@@ -34,7 +34,7 @@ This is the development branch for Caddy 2.
34 ### Menu
35
36 - [Build from source](#build-from-source)
37 - - [Building with plugins](#building-with-plugins)
37 + - [Building with plugins](#building-with-plugins-and/or-version-information)
38 - [Getting started](#getting-started)
39 - [Overview](#overview)
40 - [Full documentation](#full-documentation)
@@ -73,7 +73,7 @@ That will put a `caddy(.exe)` binary into the current directory.
73
74 If you encounter any Go-module-related errors, try clearing your Go module cache (`$GOPATH/pkg/mod`) or Go package cache (`$GOPATH/pkg`) and read [the Go wiki page about modules for help](https://github.com/golang/go/wiki/Modules). If you have issues with Go modules, please consult the Go community for help. But if there is an actual error in Caddy, please report it to us.
75
76 -### Building with plugins
76 +### Building with plugins and/or version information
77
78 Caddy is extensible with plugins. Plugins are added at compile-time, so all Caddy binaries are static (self-contained) and portable.
79
cmd/commandfuncs.go
+1 -1
@@ -131,7 +131,7 @@ func cmdStart(fl Flags) (int, error) {
131 // when one of the goroutines unblocks, we're done and can exit
132 select {
133 case <-success:
134 - fmt.Printf("Successfully started Caddy (pid=%d)\n", cmd.Process.Pid)
134 + fmt.Printf("Successfully started Caddy (pid=%d) - Caddy is running in the background\n", cmd.Process.Pid)
135 case err := <-exit:
136 return caddy.ExitCodeFailedStartup,
137 fmt.Errorf("caddy process exited with error: %v", err)
go.mod
+3 -3
@@ -12,11 +12,11 @@ require (
12 github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e
13 github.com/ilibs/json5 v1.0.1
14 github.com/jsternberg/zap-logfmt v1.2.0
15 - github.com/klauspost/compress v1.10.2
15 + github.com/klauspost/compress v1.10.3
16 github.com/klauspost/cpuid v1.2.3
17 github.com/lucas-clemente/quic-go v0.15.2
18 github.com/manifoldco/promptui v0.7.0 // indirect
19 - github.com/miekg/dns v1.1.27 // indirect
19 + github.com/miekg/dns v1.1.28 // indirect
20 github.com/muhammadmuzzammil1998/jsonc v0.0.0-20200303171503-1e787b591db7
21 github.com/naoina/go-stringutil v0.1.0 // indirect
22 github.com/naoina/toml v0.1.1
@@ -27,7 +27,7 @@ require (
27 github.com/yuin/goldmark v1.1.25
28 github.com/yuin/goldmark-highlighting v0.0.0-20200307114337-60d527fdb691
29 go.uber.org/zap v1.14.0
30 - golang.org/x/crypto v0.0.0-20200302210943-78000ba7a073
30 + golang.org/x/crypto v0.0.0-20200311171314-f7b00557c8c4
31 golang.org/x/net v0.0.0-20200301022130-244492dfa37a
32 gopkg.in/natefinch/lumberjack.v2 v2.0.0
33 gopkg.in/square/go-jose.v2 v2.4.1 // indirect
go.sum
+6 -4
@@ -373,8 +373,8 @@ github.com/kisielk/gotool v0.0.0-20161130080628-0de1eaf82fa3/go.mod h1:jxZFDH7IL
373 github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
374 github.com/klauspost/compress v1.4.0/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A=
375 github.com/klauspost/compress v1.4.1/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A=
376 -github.com/klauspost/compress v1.10.2 h1:Znfn6hXZAHaLPNnlqUYRrBSReFHYybslgv4PTiyz6P0=
377 -github.com/klauspost/compress v1.10.2/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs=
376 +github.com/klauspost/compress v1.10.3 h1:OP96hzwJVBIHYU52pVTI6CczrxPvrGfgqF9N5eTO0Q8=
377 +github.com/klauspost/compress v1.10.3/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs=
378 github.com/klauspost/cpuid v0.0.0-20180405133222-e7e905edc00e/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek=
379 github.com/klauspost/cpuid v1.2.0/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek=
380 github.com/klauspost/cpuid v1.2.3 h1:CCtW0xUnWGVINKvE/WWOYKdsPV6mawAtvQuSl8guwQs=
@@ -446,8 +446,8 @@ github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5
446 github.com/microcosm-cc/bluemonday v1.0.1/go.mod h1:hsXNsILzKxV+sX77C5b8FSuKF00vh2OMYv+xgHpAMF4=
447 github.com/miekg/dns v1.1.15 h1:CSSIDtllwGLMoA6zjdKnaE6Tx6eVUxQ29LUgGetiDCI=
448 github.com/miekg/dns v1.1.15/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg=
449 -github.com/miekg/dns v1.1.27 h1:aEH/kqUzUxGJ/UHcEKdJY+ugH6WEzsEBBSPa8zuy1aM=
450 -github.com/miekg/dns v1.1.27/go.mod h1:KNUDUusw/aVsxyTYZM1oqvCicbwhgbNgztCETuNZ7xM=
449 +github.com/miekg/dns v1.1.28 h1:gQhy5bsJa8zTlVI8lywCTZp1lguor+xevFoYlzeCTQY=
450 +github.com/miekg/dns v1.1.28/go.mod h1:KNUDUusw/aVsxyTYZM1oqvCicbwhgbNgztCETuNZ7xM=
451 github.com/miekg/pkcs11 v1.0.2/go.mod h1:XsNlhZGX73bx86s2hdc/FuaLm2CPZJemRLMA+WTFxgs=
452 github.com/mitchellh/copystructure v1.0.0 h1:Laisrj+bAB6b/yJwB5Bt3ITZhGJdqmxquMKeZ+mmkFQ=
453 github.com/mitchellh/copystructure v1.0.0/go.mod h1:SNtv71yrdKgLRyLFxmLdkAbkKEFWgYaq1OVrnRcwhnw=
@@ -785,6 +785,8 @@ golang.org/x/crypto v0.0.0-20191227163750-53104e6ec876/go.mod h1:LzIPMQfyMNhhGPh
785 golang.org/x/crypto v0.0.0-20200221231518-2aa609cf4a9d/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
786 golang.org/x/crypto v0.0.0-20200302210943-78000ba7a073 h1:xMPOj6Pz6UipU1wXLkrtqpHbR0AVFnyPEQq/wRWz9lM=
787 golang.org/x/crypto v0.0.0-20200302210943-78000ba7a073/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
788 +golang.org/x/crypto v0.0.0-20200311171314-f7b00557c8c4 h1:QmwruyY+bKbDDL0BaglrbZABEali68eoMFhTZpCjYVA=
789 +golang.org/x/crypto v0.0.0-20200311171314-f7b00557c8c4/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
790 golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
791 golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
792 golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8=
modules/caddyhttp/fileserver/command.go
+9 -5
@@ -40,10 +40,10 @@ demos, and development.
40
41 The listener's socket address can be customized with the --listen flag.
42
43 -If a qualifying hostname is specified with --domain, the default listener
44 -address will be changed to the HTTPS port and the server will use HTTPS
45 -if domain validation succeeds. Ensure A/AAAA records are properly
46 -configured before using this option.
43 +If a domain name is specified with --domain, the default listener address
44 +will be changed to the HTTPS port and the server will use HTTPS. If using
45 +a public domain, ensure A/AAAA records are properly configured before
46 +using this option.
47
48 If --browse is enabled, requests for folders without an index file will
49 respond with a file listing.`,
@@ -89,7 +89,11 @@ func cmdFileServer(fs caddycmd.Flags) (int, error) {
89 Routes: caddyhttp.RouteList{route},
90 }
91 if listen == "" {
92 - listen = ":" + strconv.Itoa(certmagic.HTTPSPort)
92 + if domain == "" {
93 + listen = ":80"
94 + } else {
95 + listen = ":" + strconv.Itoa(certmagic.HTTPSPort)
96 + }
97 }
98 server.Listen = []string{listen}
99
modules/caddyhttp/reverseproxy/command.go
+1 -1
@@ -51,7 +51,7 @@ default, all incoming headers are passed through unmodified.)
51 `,
52 Flags: func() *flag.FlagSet {
53 fs := flag.NewFlagSet("file-server", flag.ExitOnError)
54 - fs.String("from", "", "Address on which to receive traffic")
54 + fs.String("from", "localhost:443", "Address on which to receive traffic")
55 fs.String("to", "", "Upstream address to which to to proxy traffic")
56 fs.Bool("change-host-header", false, "Set upstream Host header to address of upstream")
57 return fs
modules/caddypki/pki.go
+1 -1
@@ -71,7 +71,7 @@ func (p *PKI) Start() error {
71 // install roots to trust store, if not disabled
72 for _, ca := range p.CAs {
73 if ca.InstallTrust != nil && !*ca.InstallTrust {
74 - ca.log.Warn("root certificate trust store installation disabled; clients will show warnings without intervention",
74 + ca.log.Warn("root certificate trust store installation disabled; local clients may show warnings",
75 zap.String("path", ca.rootCertPath))
76 continue
77 }