Skip to content

Instantly share code, notes, and snippets.

@wiesson
Created Mar 25, 2014
Embed
What would you like to do?
server {
listen 80;
server_name webmail.meinedomain.de;
return 301 https://$server_name$request_uri;
}
server {
listen 443;
# rewrite ^/$ https://webmail.meinedomain.de/owa permanent;
ssl on;
ssl_certificate /etc/nginx/certs/ssl_webmail.crt;
ssl_certificate_key /etc/nginx/certs/ssl_webmail.key;
ssl_session_timeout 5m;
server_name webmail.meinedomain.de;
location / {
return 301 https://webmail.meinedomain.de/owa;
}
proxy_read_timeout 360;
proxy_connect_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 Accept-Encoding "";
location /owa { proxy_pass https://test.test.local/owa; }
location /exchange { proxy_pass https://test.test.local/exchange; }
location /ews { proxy_pass https://test.test.local/ews; }
location /Microsoft-Server-ActiveSync { proxy_pass https://test.test.local/Microsoft-Server-ActiveSync; }
error_log /var/log/nginx/exchange-ssl-error.log;
access_log /var/log/nginx/exchange-ssl-access.log;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment