Files
ireddocker/iredmail/samples/nginx/templates/sogo.tmpl
T
2020-07-31 12:45:56 +00:00

61 lines
1.9 KiB
Cheetah

# Settings for SOGo Groupware
# SOGo
location ~ ^/sogo { rewrite ^ https://$host/SOGo; }
location ~ ^/SOGO { rewrite ^ https://$host/SOGo; }
# Redirect /mail to /SOGo
#location ~ ^/mail { rewrite ^ https://$host/SOGo; }
# For Mac OS X and iOS devices.
rewrite ^/.well-known/caldav /SOGo/dav permanent;
rewrite ^/.well-known/carddav /SOGo/dav permanent;
rewrite ^/principals /SOGo/dav permanent;
location ^~ /SOGo {
include PH_NGINX_CONF_TMPL_DIR/hsts.tmpl;
proxy_pass http://PH_SOGO_BIND_ADDRESS:PH_SOGO_BIND_PORT;
# forward user's IP address
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host;
# always use https
proxy_set_header x-webobjects-server-port $server_port;
proxy_set_header x-webobjects-server-name $host;
proxy_set_header x-webobjects-server-url https://$host;
proxy_set_header x-webobjects-server-protocol HTTP/1.0;
}
location ^~ /Microsoft-Server-ActiveSync {
proxy_pass http://PH_SOGO_BIND_ADDRESS:PH_SOGO_BIND_PORT/SOGo/Microsoft-Server-ActiveSync;
proxy_connect_timeout PH_SOGO_PROXY_TIMEOUT;
proxy_send_timeout PH_SOGO_PROXY_TIMEOUT;
proxy_read_timeout PH_SOGO_PROXY_TIMEOUT;
}
location ^~ /SOGo/Microsoft-Server-ActiveSync {
proxy_pass http://PH_SOGO_BIND_ADDRESS:PH_SOGO_BIND_PORT/SOGo/Microsoft-Server-ActiveSync;
proxy_connect_timeout PH_SOGO_PROXY_TIMEOUT;
proxy_send_timeout PH_SOGO_PROXY_TIMEOUT;
proxy_read_timeout PH_SOGO_PROXY_TIMEOUT;
}
location /SOGo.woa/WebServerResources/ {
alias PH_SOGO_GNUSTEP_DIR/WebServerResources/;
expires max;
}
location /SOGo/WebServerResources/ {
alias PH_SOGO_GNUSTEP_DIR/WebServerResources/;
expires max;
}
location ^/SOGo/so/ControlPanel/Products/([^/]*)/Resources/(.*)$ {
alias PH_SOGO_GNUSTEP_DIR/$1.SOGo/Resources/$2;
expires max;
}