Last active
May 2, 2016 17:20
-
-
Save taddev/7275888 to your computer and use it in GitHub Desktop.
Nginx reverse proxy settings for Exchange 2010/2013 autodiscover.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
listen 443; | |
server_name autodiscover.gwtest.us; | |
# Enable SSL | |
ssl on; | |
ssl_certificate /etc/ssl/nginx/mail.gwtest.us.crt; | |
ssl_certificate_key /etc/ssl/nginx/mail.gwtest.us.open.key; | |
ssl_session_timeout 5m; | |
# Set global proxy settings | |
proxy_read_timeout 360; | |
proxy_pass_header Date; | |
proxy_pass_header Server; | |
proxy_pass_header Authorization; | |
proxy_set_header Host $host; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
location ~* ^/Autodiscover { proxy_pass https://exch1.test.local; } | |
error_log /var/log/nginx/owa-ssl-error.log; | |
access_log /var/log/nginx/owa-ssl-access.log; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
i'm trying to set up reverse proxy with this config,
but when i try to set up mail.app in mac os - i got next error:
"Trying to log in to the Exchange server "autodiscover.server.com" failed. Make sure the email address and password you entered are correct, then click Continue".
and i have no idea where is problem... nginx error log is clean.
if mail.app tries to connect to exchange without any proxy - everything works fine.