@pitaj Yes, you are right. And I find that post will be marked as spam if there are too many codes.
lqzerogg
Posts
-
why always mark my post as spam -
Error during WebSocket handshake, I use nginxfile: src/socket.io/index, line:45
// other code // added code, force to resign variable domain = parsedUrl.hostname; // comment these codes // if (!domain) { // domain = parsedUrl.hostname; // cookies don't provide isolation by port: http://stackoverflow.com/a/16328399/122353 // } // other code
-
Error during WebSocket handshake, I use nginxAfter a hard time debugging, I found out that it's not because of nginx setting. It is because I set a "cookieDomain" config. After I remove this one, it works properly. I modify source code and fix this problem. Maybe it's not a good solution, but it works for me.
-
Error during WebSocket handshake, I use nginx@julian thx, I've solved this problem. But I can't post my solution because the stupid robot marked my post as spam.
-
why always mark my post as spamakismet is so stupid! It maked my post as spam again. Although I've solve my problem, I can't reply it!!!
-
why always mark my post as spam@pitaj ok, I got it.
-
Error during WebSocket handshake, I use nginx@pitaj My nginx directory only has these sub dirs:
client_body_temp conf fastcgi_temp html logs proxy_temp sbin scgi_temp uwsgi_temp
And even I do what you said, nginx still not working. I seems that my nginx can only set config by conf/nginx.conf file. sites-available/ and sites-enabled/ seems useless to me.
-
Error during WebSocket handshake, I use nginx@pitaj
My nginx dir only has these dirs: -
Error during WebSocket handshake, I use nginx@pitaj because my nginx has other services. I have to follow previous configs. Anyway, I'll try what you said.
-
Error during WebSocket handshake, I use nginx@jenkler well, that's because I edit it.
-
Error during WebSocket handshake, I use nginx@jenkler works fine?
-
Error during WebSocket handshake, I use nginxwell, though nodebb websocket cannot be connected, a simple websocket server I wrote can be connected. I use the same config :
upstream acp_io_nodes { #ip_hash; server localhost:3434; } server { listen 80; server_name test1-forum-acp.ezsport.cc; location / { proxy_pass http://acp_io_nodes; proxy_read_timeout 300s; 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 Upgrade $http_upgrade; proxy_set_header Connection $connection_upgrade; } }
here is my server's code:
console.log("Server started"); var Msg = ''; var WebSocketServer = require('ws').Server , wss = new WebSocketServer({port: 3434}); wss.on('connection', function(ws) { ws.on('message', function(message) { console.log('Received from client: %s', message); ws.send('Server received from client: ' + message); }); });
Hope someone will rescue me soon.
-
why always mark my post as spam@jenkler What do you mean? I can't understand. I think do not have multi threads. It mark my post as spam again.
-
why always mark my post as spam@jenkler it seems that it marks my post as spam base on post content.
-
Error during WebSocket handshake, I use nginxI've searched for a whole day, and of course I searched in nodeBB first. But I cannot find a post that solves my problem. So I ask for help here. Please do not mark my post as spam again.
I've read nginx config document, and I've done most of the configs. But it still doesn't work . The queer thing is that it works well in my mac, but it does not work in my server.
My server is CentOS release 6.6 (Final).And I cannot understand these things:
/path/to/nginx/sites-available/* -- files here must be aliased to ../sites-enabled(my nginx does not have such directory)
/path/to/nginx/conf.d/*.conf -- filenames must end in .conf
/path/to/nginx/httpd.conf -- if all else fails (What does it mean?)Here is my error informations:
WebSocket connection to 'ws://test1-forum-acp.ezsport.cc/socket.io/?EIO=3&transport=websocket' failed: Error during WebSocket handshake: Unexpected response code: 400Here is my config:
user nginx; worker_processes 2; error_log /mnt/logs/nginx/error.log; pid /var/run/nginx.pid; events { worker_connections 1024; } http { include mime.types; default_type application/octet-stream; log_format main '$remote_addr - $remote_user [$time_local] "$request" ' '$status $body_bytes_sent "$http_referer" ' '"$http_user_agent" "$http_x_forwarded_for"'; access_log /mnt/logs/nginx/access.log main; server_names_hash_bucket_size 64; sendfile on; keepalive_timeout 65; server { listen 80; server_name localhost; location / { root html; index index.html index.htm; } error_page 500 502 503 504 /50x.html; location = /50x.html { root html; } } include /etc/nginx1.8/conf/conf.d/*.conf; }
conf.d/ includes config file blow
map $http_upgrade $connection_upgrade { default upgrade; '' close; } server { listen 80; client_max_body_size 5m; server_name test1-forum-acp.ezsport.cc; location / { proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header X-NginX-Proxy true; proxy_pass http://acp_io_nodes; proxy_redirect off; # Socket.IO Support 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 Upgrade $http_upgrade; proxy_set_header Connection $connection_upgrade; } } upstream acp_io_nodes { ip_hash; server 127.0.0.1:5568; }
-
why always mark my post as spam@jenkler I found it when I want to edit my post. After it maked, I post a second one. Then it maked again.
-
why always mark my post as spamI just wanna why. Isn't here the place where developer can ask for hlep?