我有一个服务器正在运行Caddy,可以在域rv2680.1blu.de和marleneschulz.info. 两个 DNS A 记录都指向 IP 地址178.254.7.175。我想确保Caddy始终将用户重定向到https://marleneschulz.info.
这是我的工作Caddyfile:
www.marleneschulz.info {
redir https://marleneschulz.info
}
https://marleneschulz.info {
root /app/marlene/shared
proxy / django_prod:5000 {
header_upstream Host {host}
header_upstream X-Real-IP {remote}
header_upstream X-Forwarded-Proto {scheme}
except /static
}
log stdout
errors stdout
gzip
}
如何通过明确定义从、、和to重定向每个请求来防止Caddy响应?404 Site rv2680.1blu.de is not served on this interfacerv2680.1blu.de:80rv2680.1blu.de:443178.254.7.175:80178.254.7.175:443marleneschulz.infohttps://marleneschulz.info
我也有点困惑,因为文档没有说明www.前缀。我想尽可能明确。