map $http_upgrade $connection_upgrade { default upgrade; '' close; } server{ listen 7878 ssl; listen [::]:7878 ssl; ssl_certificate /etc/letsencrypt/live/educbot.jean-cloud.net/fullchain.pem; ssl_certificate_key /etc/letsencrypt/live/educbot.jean-cloud.net/privkey.pem; location / { proxy_pass http://bot.educbotjean-cloudnet.docker:8080; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection $connection_upgrade; proxy_read_timeout 120s; } } server { listen 443 ssl http2; listen [::]:443 ssl http2; ssl_certificate /etc/letsencrypt/live/educbot.jean-cloud.net/fullchain.pem; ssl_certificate_key /etc/letsencrypt/live/educbot.jean-cloud.net/privkey.pem; server_name educbot.jean-cloud.net www.educbot.jean-cloud.net; root /data/educbot.jean-cloud.net/public; location / { index index.html; try_files $uri $uri/ =404; } }