server {
server_name example.com;
location / {
proxy_pass http://localhost:3000;
}
location /peerjs {
proxy_pass http://localhost:3000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
}
location ~* \.io {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_set_header X-NginX-Proxy false;
proxy_pass http://localhost:3099;
proxy_redirect off;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
listen 443 ssl;
ssl_certificate ...; # managed by Certbot
ssl_certificate_key ...; # managed by Certbot
}
server {
listen 443 ssl;
ssl_certificate /etc/ssl/certificate.crt;
ssl_certificate_key /etc/ssl/private.key;
server_name alltech.home.com;
location /v1/doit/completions {
proxy_ssl_verify on;
proxy_ssl_session_reuse on;
proxy_ssl_name localhost;
proxy_pass https://api.open.my/v1/doit/completions;
}
location / {
root /usr/share/nginx/html/;
autoindex off;
}
}
WebSocket connection to … failed: Invalid frame headerто есть на стеке пишут что просто твой сокет на клиенте - пытается юзать сервер ссокет, а в документации сказано что по умолчанию он подключит клиентский