mirror of
https://github.com/caddyserver/caddy.git
synced 2025-05-30 07:35:51 +08:00
core: Bind all listeners to wildcard host by default (closes #208)
This behavior can still be overridden by bind directive
This commit is contained in:
11
main.go
11
main.go
@ -87,11 +87,10 @@ func main() {
|
||||
fmt.Printf("Notice: %s is only accessible on this machine (%s)\n",
|
||||
conf.Host, addr.IP.String())
|
||||
}
|
||||
}
|
||||
|
||||
if !checkedFdLimit && !addr.IP.IsLoopback() {
|
||||
checkFdlimit()
|
||||
checkedFdLimit = true
|
||||
if !checkedFdLimit && !addr.IP.IsLoopback() && !isLocalhost(conf.Host) {
|
||||
checkFdlimit()
|
||||
checkedFdLimit = true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -111,7 +110,7 @@ func checkFdlimit() {
|
||||
// Note that an error here need not be reported
|
||||
lim, err := strconv.Atoi(string(bytes.TrimSpace(out)))
|
||||
if err == nil && lim < min {
|
||||
fmt.Printf("Warning: File descriptor limit %d is too low for production sites.\nAt least %d is recommended. Set with \"ulimit -n %d\".\n", lim, min, min)
|
||||
fmt.Printf("Warning: File descriptor limit %d is too low for production sites. At least %d is recommended. Set with \"ulimit -n %d\".\n", lim, min, min)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user