ngx_upstream_jdomain
ngx_upstream_jdomain copied to clipboard
Jdomain support sockets?
Hi, I want to know if jdomain support the headers:
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
or my config is wrong
This is my nginx.config: ` load_module /usr/local/nginx/modules/objs/ngx_http_upstream_jdomain_module.so; user nginx; worker_processes auto; pid /run/nginx.pid; include /etc/nginx/modules-enabled/*.conf; events { worker_connections 1024; multi_accept on; } http { client_max_body_size 0; resolver 127.0.0.11 valid=30s;
server {
listen 80;
proxy_buffer_size 128k;
proxy_buffers 4 256k;
proxy_busy_buffers_size 256k;
server_name http://proxy;
proxy_connect_timeout 1200s;
proxy_send_timeout 1200s;
proxy_read_timeout 1200s;
fastcgi_send_timeout 1200s;
fastcgi_read_timeout 1200s;
location ~ ^/(?!(api/)){
set $test_arch_archivistica_ui http://test_arch_archivistica_ui:80;
rewrite /(.*) /$1 break;
proxy_pass $test_arch_archivistica_ui;
}
location /api/notifications_alert{
rewrite /api/notifications_alert/(.*) /$1 break;
set $test_notifications_alert test_notifications_alert;
proxy_pass http://$test_arch_notifications_notifications_alert;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_set_header Host $host;
}
}
upstream test_notifications_alert{
server 127.0.0.2 backup;
jdomain test_arch_notifications strict interval=10 port=3001;
}
server {
listen 127.0.0.2:80;
return 502 'An error.';
}
} ` and the way I connect is:
`
var private_socket = io('192.168.0.227/private-alert', {path:"/test_arch/api/notifications_alert/socket.io"} );
private_socket.on('connect', function(msg) {
console.log('Usuario ${msg} conectado')
});
`
the error that marks me is:
WebSocket connection to 'ws://192.168.0.227/test_arch/api/notifications_alert/socket.io/?EIO=3&transport=websocket' failed:
thanks in advance :D