我有一个带有 headers-more-nginx 模块的 Nginx 代理服务器,它将请求传递给 Exchange Server 2019。目前,每次我尝试连接到我的服务器时,Outlook 2019 都会陷入循环,要求输入凭据 – 它会要求输入密码,接受密码,然后再次询问。此问题在其他设备上重复出现。
Microsoft Store 中最新的 Outlook 运行正常。
此外,如果是 Netscaler 而不是 Nginx,一切正常,所以我认为 Nginx 配置错误,但我现在无法访问 Netscaler 配置。
我应该如何更改 Nginx 配置才能使其正常工作?
当前 nginx 配置:
http {
server {
listen 80;
listen 443 ssl;
server_name mail.mydomain.com;
ssl_certificate /etc/ssl/certs/mydomain.crt;
ssl_certificate_key /etc/ssl/certs/mydomain.key;
ssl_trusted_certificate /etc/ssl/certs/mydomain.crt;
ssl_session_timeout 5m;
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains; preload;" always;
location / {
proxy_pass_request_headers on;
keepalive_timeout 3h;
tcp_nodelay on;
client_max_body_size 3G;
#proxy_buffering off; # tried both on and off
#proxy_request_buffering off;
proxy_read_timeout 3600;
proxy_pass_header Date;
proxy_pass_header Server;
proxy_set_header Authorization $http_authorization;
proxy_pass_header Authorization;
proxy_set_header Connection "Keep-Alive";
proxy_http_version 1.1;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Forwarded-Host $host:$server_port;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
more_set_input_headers 'Authorization: $http_authorization';
# I tried to use Nginx's domain as well as domain of Exchange server, no luck
more_set_headers -s 401 'WWW-Authenticate: Basic realm="mail.mydomain.com"';
proxy_pass https://exchange$request_uri;
}
}
}
upstream exchange {
ip_hash;
server exchangeip1:443;
server exchangeip2:443;
}
5
–
–
–
–
–
|