Files
ActivePush/deploy/nginx-active-push.conf
T
2026-11-05 12:52:32 +01:00

48 lines
2.0 KiB
Plaintext

# ActivePush - drop-in replacement for the Z-Push PHP-FPM locations.
# Put these inside the existing `server { listen 443 ssl; ... }` block of the mail host.
location = /Microsoft-Server-ActiveSync {
proxy_pass http://127.0.0.1:8081;
proxy_http_version 1.1;
proxy_set_header Connection "";
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme;
# Ping/hanging Sync keep the request open up to ~59 minutes
proxy_read_timeout 3660s;
proxy_send_timeout 3660s;
proxy_buffering off;
proxy_request_buffering on;
client_max_body_size 64m;
}
# Health check for monitoring / load balancers (no authentication, no data).
location = /activesync-healthz {
proxy_pass http://127.0.0.1:8081/healthz;
access_log off;
}
# The same three case variants previously routed to autodiscover.php
location = /AutoDiscover/AutoDiscover.xml { include /etc/nginx/snippets/active-push-autodiscover.conf; }
location = /Autodiscover/Autodiscover.xml { include /etc/nginx/snippets/active-push-autodiscover.conf; }
location = /autodiscover/autodiscover.xml { include /etc/nginx/snippets/active-push-autodiscover.conf; }
# --- /etc/nginx/snippets/active-push-autodiscover.conf -------------------------
# proxy_pass http://127.0.0.1:8081;
# proxy_set_header Host $host;
# proxy_set_header X-Forwarded-For $remote_addr;
# proxy_set_header X-Forwarded-Proto $scheme;
# proxy_read_timeout 300s;
# client_max_body_size 64k;
# --- Optional: panel behind nginx with an extra auth layer ----------------------
# location /active-push-admin/ {
# allow 10.0.0.0/8; deny all;
# proxy_pass http://127.0.0.1:9091/;
# proxy_set_header X-Forwarded-For $remote_addr;
# proxy_set_header X-Forwarded-Proto $scheme;
# proxy_buffering off; # live event stream (SSE)
# }
# The panel uses absolute paths (/api, /app.js); a dedicated (sub)domain is simpler:
# server { server_name push-admin.example.com; location / { proxy_pass http://127.0.0.1:9091; ... } }