我想将所有流量重定向到HTTPS,但有两个位置用于域验证。
这是我的配置:
server {
server_name xxxx.de www.xxxx.de;
# SSLMate domain validation
location /.well-known/pki-validation/ {
proxy_pass https://xxxx.http-approval.sslmate.com$request_uri;
proxy_set_header X-Forwarded-Host $http_host;
resolver 8.8.8.8;
}
location /.well-known/acme-challenge/ {
proxy_pass https://xxxx.http-approval.sslmate.com$request_uri;
proxy_set_header X-Forwarded-Host $http_host;
resolver 8.8.8.8;
}
# Redirect everything else to HTTPS
location / {
rewrite ^ https://xxxx.de/index.htm permanent;
}
}
不幸的是," /"的规则选择了所有内容。地点。我究竟做错了什么?