Backup before adding SMTP stream proxy configuration
This commit is contained in:
@@ -1,7 +1,19 @@
|
||||
add_header X-Robots-Tag "noindex, nofollow, nosnippet, noarchive";
|
||||
|
||||
proxy_cache_path /tmp/stream/ levels=1:2 keys_zone=my_cache_stream:10m max_size=10g
|
||||
inactive=60m use_temp_path=off;
|
||||
# Upstream with keepalive for streaming
|
||||
upstream stream_backend {
|
||||
server 10.0.0.48:8096;
|
||||
keepalive 32;
|
||||
keepalive_requests 100;
|
||||
keepalive_timeout 60s;
|
||||
}
|
||||
|
||||
# WebSocket upgrade map
|
||||
map $http_upgrade $connection_upgrade {
|
||||
default upgrade;
|
||||
'' close;
|
||||
}
|
||||
|
||||
server{
|
||||
listen 80;
|
||||
server_name stream.egonetix.de;
|
||||
@@ -24,46 +36,43 @@ server {
|
||||
access_log /var/log/nginx/stream-access.log;
|
||||
error_log /var/log/nginx/stream-error.log;
|
||||
|
||||
# Gzip for text content only
|
||||
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;
|
||||
|
||||
# WebSocket for real-time updates
|
||||
location /socket {
|
||||
proxy_pass http://stream_backend;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection $connection_upgrade;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_buffering off;
|
||||
proxy_read_timeout 7200s;
|
||||
}
|
||||
|
||||
location / {
|
||||
|
||||
proxy_cache my_cache_stream;
|
||||
proxy_cache_revalidate on;
|
||||
proxy_cache_min_uses 3;
|
||||
proxy_cache_use_stale error timeout updating http_500 http_502 http_503 http_504;
|
||||
proxy_cache_lock on;
|
||||
proxy_pass_header Authorization;
|
||||
proxy_pass http://$upstream:8096;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Connection "";
|
||||
proxy_buffering off;
|
||||
client_max_body_size 0;
|
||||
proxy_read_timeout 36000s;
|
||||
proxy_redirect off;
|
||||
proxy_ssl_session_reuse off;
|
||||
|
||||
}
|
||||
|
||||
location /socket {
|
||||
|
||||
proxy_cache my_cache_stream;
|
||||
proxy_cache_revalidate on;
|
||||
proxy_cache_min_uses 3;
|
||||
proxy_cache_use_stale error timeout updating http_500 http_502 http_503 http_504;
|
||||
proxy_cache_lock on;
|
||||
proxy_pass_header Authorization;
|
||||
proxy_pass http://$upstream:8096;
|
||||
proxy_pass http://stream_backend;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Connection "";
|
||||
|
||||
# No caching for media streams
|
||||
proxy_buffering off;
|
||||
|
||||
client_max_body_size 0;
|
||||
proxy_read_timeout 36000s;
|
||||
proxy_redirect off;
|
||||
|
||||
Reference in New Issue
Block a user