mirror of
https://github.com/caddyserver/caddy.git
synced 2024-12-23 22:27:38 -05:00
58085edc16
If we listen on 127.0.0.1:80 for `localhost` but :80 for everything else, then a hostname in the hosts file that resolves to 127.0.0.1 will be served on :80 (unless the bind directive is used) but the OS will use the socket listening at 127.0.0.1:80, thus giving a "No such site" error even though the site is there, but it's on the other listener at :80. Two ways to fix this: 1) Leave as-is and require the user to set "bind 127.0.0.1" in their Caddyfile for all sites that are resolved in the hosts file, or 2) Take out this special case and let localhost sites listen on :80 (unless the user changes that with the bind directive, of course). Having localhost bind to any interface is a little annoying (unsettling?) but probably best in the long run. https://forum.caddyserver.com/t/wildcard-virtual-domains-with-wildcard-roots/221/9?u=matt |
||
---|---|---|
.. | ||
condition.go | ||
condition_test.go | ||
context.go | ||
context_test.go | ||
graceful.go | ||
https.go | ||
https_test.go | ||
middleware.go | ||
middleware_test.go | ||
plugin.go | ||
plugin_test.go | ||
recorder.go | ||
recorder_test.go | ||
replacer.go | ||
replacer_test.go | ||
roller.go | ||
server.go | ||
server_test.go | ||
siteconfig.go | ||
vhosttrie.go | ||
vhosttrie_test.go |