One socket cant connact
Solved
General Discussion
-
Hello!
I have problem with one socket connections. How can i solve this problem?
socket.io.js:2 WebSocket connection to 'ws://cswild.pl/socket.io/?EIO=3&transport=websocket&sid=pkJIrsFKKjQz_JHcAAAF' failed: Error during WebSocket handshake: Unexpected response code: 500 e.doOpen @ socket.io.js:2
-
Is the
url
value in your config.json set to exactly the URL at which you access the site? If your site is at https://example.com then you must have"url": "https://example.com"
set in the config.json -
@master what is your nginx config?
-
@PitaJ I use apache.
<VirtualHost XXX> SuexecUserGroup "#1002" "#1002" ServerName cswild.pl ServerAlias www.cswild.pl ServerAlias webmail.cswild.pl ServerAlias admin.cswild.pl DocumentRoot /home/cswild/public_html ErrorLog /var/log/virtualmin/cswild.pl_error_log CustomLog /var/log/virtualmin/cswild.pl_access_log combined ScriptAlias /cgi-bin/ /home/cswild/cgi-bin/ DirectoryIndex index.html index.htm index.php index.php4 index.php5 <Directory /home/cswild/public_html> Options -Indexes +IncludesNOEXEC +SymLinksIfOwnerMatch +ExecCGI allow from all AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch Require all granted AddType application/x-httpd-php .php AddHandler fcgid-script .php AddHandler fcgid-script .php5 AddHandler fcgid-script .php7.0 AddHandler fcgid-script .php7.1 FCGIWrapper /home/cswild/fcgi-bin/php7.0.fcgi .php FCGIWrapper /home/cswild/fcgi-bin/php5.fcgi .php5 FCGIWrapper /home/cswild/fcgi-bin/php7.0.fcgi .php7.0 FCGIWrapper /home/cswild/fcgi-bin/php7.1.fcgi .php7.1 </Directory> <Directory /home/cswild/cgi-bin> allow from all AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch Require all granted </Directory> RewriteEngine on RewriteCond %{HTTP_HOST} =webmail.cswild.pl RewriteRule ^(.*) https://cswild.pl:20000/ [R] RewriteCond %{HTTP_HOST} =admin.cswild.pl RewriteRule ^(.*) https://cswild.pl:10000/ [R] RemoveHandler .php RemoveHandler .php5 RemoveHandler .php7.0 RemoveHandler .php7.1 php_admin_value engine Off FcgidMaxRequestLen 1073741824 ProxyRequests off <Proxy *> Order deny,allow Allow from all </Proxy> ## edit the next line if you use https ##RequestHeader set X-Forwarded-Proto "http" RewriteEngine On RewriteCond %{REQUEST_URI} ^/socket.io [NC] RewriteCond %{QUERY_STRING} transport=websocket [NC] RewriteRule /(.*) ws://cswild.pl:4567/$1 [P,L] ProxyPass / http://cswild.pl:4567/ ProxyPassReverse / http://cswild.pl:4567/ IPCCommTimeout 31 </VirtualHost>
-
Have you looked at the Apache instructions on https://docs.nodebb.org
Copyright © 2024 NodeBB | Contributors