我是 nginx 反向代理的新手,我的问题是 Outlook 无法通过自动发现连接到 echange 服务器,也无法通过以下配置打开 IMAP:
server {
listen 80;
server_name email.mydomain.com;
return 301 https://email.mydomain.com$request_uri;
}
server {
listen 443;
server_name email.mydomain.com;
set $exchange2019 https://internal.ip;
# Redirect from "/" to "/owa" by default
rewrite ^/$ https://email.mydomain.com/owa permanent;
# Enable SSL
ssl on;
ssl_certificate /etc/nginx/ssl/email-mobile/Exg-Mobile.crt;
ssl_certificate_key /etc/nginx/ssl/email-mobile/Exg-Mobile.rsa;
ssl_session_timeout 5m;
# Set global proxy settings
proxy_pass_request_headers on;
proxy_read_timeout 360;
proxy_pass_header Date;
proxy_pass_header Server;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
# proxy_set_header Authorization $http_authorization;
# proxy_pass_header Authorization;
location ~* ^/owa { proxy_pass $exchange2019; }
location ~* ^/Microsoft-Server-ActiveSync { proxy_set_header X-Forwarded-Proto https; proxy_pass $exchange2016; }
location ~* ^/ecp { proxy_pass $exchange2019; }
location ~* ^/Rpc { proxy_pass $exchange2019; }
#location ~* ^/mailarchiver { proxy_pass https://mailarchiver.local;}
# location ~* ^/Autodiscover { proxy_pass $exchange2016/Autodiscover; }
# location ~* ^/autodiscover { proxy_pass $exchange2016/autodiscover; }
error_log /var/log/nginx/owa-ssl-error.log;
access_log /var/log/nginx/owa-ssl-access.log;
}
server {
listen 443;
server_name autodiscover.mydomain.com;
set $exchange2019 https://internal.ip;
# Enable SSL
ssl on;
ssl_certificate /etc/nginx/ssl/email-mobile/Exg-Mobile.crt;
ssl_certificate_key /etc/nginx/ssl/email-mobile/Exg-Mobile.rsa;
ssl_session_timeout 5m;
# Set global proxy settings
proxy_pass_request_headers on;
proxy_read_timeout 360;
proxy_pass_header Date;
proxy_pass_header Server;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Authorization $http_authorization;
proxy_pass_header Authorization;
location ~* ^/Autodiscover { proxy_pass $exchange2019/Autodiscover; }
location ~* ^/autodiscover { proxy_pass $exchange2019/autodiscover; }
error_log /var/log/nginx/owa-ssl-error.log;
access_log /var/log/nginx/owa-ssl-access.log;
}
我想从我的内部网络和外部的 Outlook 连接到我的 Exchange 服务器,使用自动发现功能,但是当我将我的电子邮件地址添加到 Outlook 时,IMAP 正在运行,但我想要图片中的另一个页面