diff options
author | Matthew Holt <mholt@users.noreply.github.com> | 2020-03-13 13:02:47 -0600 |
---|---|---|
committer | Matthew Holt <mholt@users.noreply.github.com> | 2020-03-13 13:04:10 -0600 |
commit | 6cbd93736fcd2e202fb4d5cfc3f9dd45b6121b0b (patch) | |
tree | 43c67b6de541552e5cb3a6e10029c035693369d4 /modules/caddyhttp/fileserver | |
parent | c4472363579e26485fdfc01f4fd79b86d44acd86 (diff) |
Minor tweaks
Diffstat (limited to 'modules/caddyhttp/fileserver')
-rw-r--r-- | modules/caddyhttp/fileserver/command.go | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/modules/caddyhttp/fileserver/command.go b/modules/caddyhttp/fileserver/command.go index 18e9be3..943ddaa 100644 --- a/modules/caddyhttp/fileserver/command.go +++ b/modules/caddyhttp/fileserver/command.go @@ -40,10 +40,10 @@ demos, and development. The listener's socket address can be customized with the --listen flag. -If a qualifying hostname is specified with --domain, the default listener -address will be changed to the HTTPS port and the server will use HTTPS -if domain validation succeeds. Ensure A/AAAA records are properly -configured before using this option. +If a domain name is specified with --domain, the default listener address +will be changed to the HTTPS port and the server will use HTTPS. If using +a public domain, ensure A/AAAA records are properly configured before +using this option. If --browse is enabled, requests for folders without an index file will respond with a file listing.`, @@ -89,7 +89,11 @@ func cmdFileServer(fs caddycmd.Flags) (int, error) { Routes: caddyhttp.RouteList{route}, } if listen == "" { - listen = ":" + strconv.Itoa(certmagic.HTTPSPort) + if domain == "" { + listen = ":80" + } else { + listen = ":" + strconv.Itoa(certmagic.HTTPSPort) + } } server.Listen = []string{listen} |