-
Notifications
You must be signed in to change notification settings - Fork 0
/
mail.conf
37 lines (31 loc) · 1.05 KB
/
mail.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# https://mail.*
server {
listen 443 ssl http2;
server_name mail.*;
ssl_certificate /etc/letsencrypt/live/mail.example.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/mail.example.com/privkey.pem;
location / {
proxy_pass https://localhost:8443;
proxy_set_header X-Forwarded-Host $http_host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
proxy_http_version 1.1;
proxy_redirect default;
proxy_read_timeout 90;
proxy_connect_timeout 90;
client_max_body_size 10m;
client_body_buffer_size 128k;
proxy_send_timeout 90;
proxy_buffer_size 16k;
proxy_buffers 32 16k;
proxy_busy_buffers_size 64k;
}
}
# http://mail.*
server {
listen 80;
server_name mail.*;
return 301 https://$host$request_uri;
}