40 lines
1.1 KiB
Plaintext
40 lines
1.1 KiB
Plaintext
server {
|
|
server_name mail.dym.sh;
|
|
listen 80;
|
|
listen [::]:80;
|
|
|
|
location ~ /\.well-known/acme-challenge {
|
|
root /var/lib/letsencrypt/;
|
|
}
|
|
|
|
location / {
|
|
proxy_pass http://127.0.0.1:11080;
|
|
proxy_set_header Host $host;
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection "upgrade";
|
|
proxy_set_header X-Forwarded-For $remote_addr;
|
|
proxy_set_header X-Forwarded-Proto $scheme;
|
|
}
|
|
}
|
|
|
|
server {
|
|
server_name mail.dym.sh;
|
|
listen 443 ssl http2;
|
|
listen [::]:443 ssl http2;
|
|
|
|
ssl_trusted_certificate /etc/letsencrypt/live/dym.sh/chain.pem;
|
|
ssl_certificate /etc/letsencrypt/live/dym.sh/fullchain.pem;
|
|
ssl_certificate_key /etc/letsencrypt/live/dym.sh/privkey.pem;
|
|
|
|
location / {
|
|
proxy_pass http://127.0.0.1:11443;
|
|
proxy_set_header Host $host;
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection "upgrade";
|
|
proxy_set_header X-Forwarded-For $remote_addr;
|
|
proxy_set_header X-Forwarded-Proto $scheme;
|
|
}
|
|
|
|
client_max_body_size 2000M;
|
|
}
|