-
-
Save unicorn667/08b93a9fdeec830016e95d635df9d33c to your computer and use it in GitHub Desktop.
Nginx reverse proxy to Exchange 2010/2013
This file contains hidden or 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 80; | |
#listen [::]:80; | |
server_name mail.gwtest.us autodiscover.gwtest.us; | |
return 301 https://$host$request_uri; | |
} | |
server { | |
listen 443; | |
#listen [::]:443 ipv6only=on; | |
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; | |
server_name mail.gwtest.us; | |
location / { | |
return 301 https://mail.gwtest.us/owa; | |
} | |
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 ~* ^/owa { proxy_pass https://exch1.test.local; } | |
location ~* ^/Microsoft-Server-ActiveSync { proxy_pass https://exch1.test.local; } | |
location ~* ^/ecp { proxy_pass https://exch1.test.local; } | |
location ~* ^/rpc { proxy_pass https://exch1.test.local; } | |
#location ~* ^/mailarchiver { proxy_pass https://mailarchiver.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