90 lines
2.3 KiB
Plaintext
90 lines
2.3 KiB
Plaintext
add_header X-Robots-Tag "noindex, nofollow, nosnippet, noarchive";
|
|
|
|
# Upstream with keepalive for Jitsi
|
|
upstream jitsi_backend {
|
|
server 10.0.0.48:8000;
|
|
keepalive 32;
|
|
keepalive_requests 1000;
|
|
keepalive_timeout 60s;
|
|
}
|
|
|
|
# WebSocket upgrade map
|
|
map $http_upgrade $connection_upgrade {
|
|
default upgrade;
|
|
'' close;
|
|
}
|
|
|
|
server{
|
|
listen 80;
|
|
server_name jitsi.egonetix.de;
|
|
return 301 https://$server_name$request_uri;
|
|
}
|
|
|
|
server {
|
|
listen 10.0.0.29:443 ssl http2;
|
|
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;
|
|
|
|
# SSL config
|
|
ssl on;
|
|
ssl_certificate /etc/letsencrypt/live/jitsi.egonetix.de/fullchain.pem;
|
|
ssl_certificate_key /etc/letsencrypt/live/jitsi.egonetix.de/privkey.pem;
|
|
ssl_dhparam /etc/ssl/certs/dhparam.pem;
|
|
|
|
# Make site accessible from http://localhost/
|
|
server_name jitsi.egonetix.de;
|
|
|
|
access_log /var/log/nginx/jitsi-access_log;
|
|
error_log /var/log/nginx/jitsi-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;
|
|
|
|
# WebSocket support for Jitsi real-time communication
|
|
location /xmpp-websocket {
|
|
proxy_pass http://jitsi_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;
|
|
}
|
|
|
|
# Static files with caching
|
|
location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg|woff|woff2|ttf|eot)$ {
|
|
proxy_pass http://jitsi_backend;
|
|
expires 24h;
|
|
add_header Cache-Control "public, immutable";
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Connection "";
|
|
}
|
|
|
|
location / {
|
|
|
|
proxy_pass_header Authorization;
|
|
proxy_pass http://jitsi_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 "";
|
|
proxy_buffering off;
|
|
client_max_body_size 0;
|
|
proxy_read_timeout 36000s;
|
|
proxy_redirect off;
|
|
proxy_ssl_session_reuse off;
|
|
|
|
}
|
|
|
|
}
|