Backup before adding SMTP stream proxy configuration

This commit is contained in:
root
2026-01-23 11:02:06 +01:00
parent 62d24a96af
commit ef16045880
44 changed files with 2516 additions and 319 deletions

View File

@@ -1,5 +1,13 @@
add_header X-Robots-Tag "noindex, nofollow, nosnippet, noarchive";
# Upstream with keepalive for Matrix
upstream matrix_backend {
server 10.0.0.48:8008;
keepalive 32;
keepalive_requests 1000;
keepalive_timeout 60s;
}
# Redirect HTTP to HTTPS
server {
listen 10.0.0.29:80;
@@ -19,16 +27,31 @@ server {
access_log /var/log/nginx/matrix-access.log;
error_log /var/log/nginx/matrix-error.log;
# Gzip compression
gzip on;
gzip_vary on;
gzip_proxied any;
gzip_comp_level 5;
gzip_types text/plain text/css text/xml text/javascript
application/json application/javascript application/xml+rss;
gzip_min_length 1000;
set $upstream 10.0.0.48;
location ~ ^(/_matrix|/_synapse/client) {
proxy_pass http://$upstream:8008;
proxy_pass http://matrix_backend;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Host $host;
proxy_http_version 1.1;
proxy_set_header Connection "";
# Better buffering for Matrix
proxy_buffering on;
proxy_buffer_size 8k;
proxy_buffers 32 8k;
client_max_body_size 50M;
proxy_http_version 1.1;
}
}
@@ -44,16 +67,31 @@ server {
access_log /var/log/nginx/matrix-access.log;
error_log /var/log/nginx/matrix-error.log;
# Gzip compression
gzip on;
gzip_vary on;
gzip_proxied any;
gzip_comp_level 5;
gzip_types text/plain text/css text/xml text/javascript
application/json application/javascript application/xml+rss;
gzip_min_length 1000;
set $upstream 10.0.0.48;
location ~ ^(/_matrix|/_synapse/client) {
proxy_pass http://$upstream:8008;
proxy_pass http://matrix_backend;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Host $host;
proxy_http_version 1.1;
proxy_set_header Connection "";
# Better buffering for Matrix
proxy_buffering on;
proxy_buffer_size 8k;
proxy_buffers 32 8k;
client_max_body_size 50M;
proxy_http_version 1.1;
}
}