0
Fork 0
mirror of https://github.com/caddyserver/caddy.git synced 2024-12-23 22:27:38 -05:00

Merge branch 'configfix' into letsencrypt

This commit is contained in:
Matthew Holt 2015-10-16 11:47:32 -06:00
commit dd91812b11

View file

@ -2,6 +2,7 @@ package setup
import (
"crypto/tls"
"log"
"strings"
"github.com/mholt/caddy/middleware"
@ -12,6 +13,12 @@ func TLS(c *Controller) (middleware.Middleware, error) {
c.TLS.Enabled = true
}
if c.Port == "http" {
c.TLS.Enabled = false
log.Printf("Warning: TLS disabled for %s://%s. To force TLS over the plaintext HTTP port, "+
"specify port 80 explicitly (https://%s:80).", c.Port, c.Host, c.Host)
}
for c.Next() {
args := c.RemainingArgs()
switch len(args) {