socket.io not found (err 404)



  • Hello,

    and the next Problem 😞 if i run the forum over http://ip:port all works fine now i have changed the config to:

    {
        "url": "https://community.hypercube-evolution.de",
        "secret": "**********************************",
        "port": "4567",
        "database": "redis",
    
        "redis": {
            "host": "127.0.0.1",
            "port": "6379",
            "password": "**********************",
            "database": "13"
        }
    }
    

    and added the proxy settings to nginx:

    location ~ / {
    	proxy_set_header X-Real-IP $remote_addr;
    	proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    	proxy_set_header X-Forwarded-Proto $scheme;
    	proxy_set_header Host $http_host;
    	proxy_set_header X-NginX-Proxy true;
    
    	proxy_pass http://127.0.0.1:4567;
    	proxy_redirect off;
    
    	# Socket.IO Support
    	proxy_http_version 1.1;
    	proxy_set_header Upgrade $http_upgrade;
    	proxy_set_header Connection "upgrade";
    }
    

    after this changes i get allways the message that the connection to the server is lost and the in the webconsole i get this message:

    2019-05-31 14_39_01-Allgemein _ Sprachen _ NodeBB Admin Systemsteuerung.png

    what i do wrong ?!?

    regards

    Andy


  • Staff Admin

    @siam said in socket.io not found (err 404):

    location ~ /

    Maybe try with

    location / {
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_set_header X-Forwarded-Proto $scheme;
            proxy_set_header Host $http_host;
            proxy_set_header X-NginX-Proxy true;
    
            proxy_pass http://127.0.0.1:4567;  # no trailing slash
            proxy_redirect off;
    
            # Socket.IO Support
            proxy_http_version 1.1;
            proxy_set_header Upgrade $http_upgrade;
            proxy_set_header Connection "upgrade";
        }
    


  • the same error socket.io not found


  • Staff Admin

    Maybe post your entire nginx config.



  • here the main config for the vhost:

    #ATTENTION!
    #
    #DO NOT MODIFY THIS FILE BECAUSE IT WAS GENERATED AUTOMATICALLY,
    #SO ALL YOUR CHANGES WILL BE LOST THE NEXT TIME THE FILE IS GENERATED.
    
    server {
            listen 212.227.91.81:443 ssl http2;
    
            server_name community.hypercube-evolution.de;
            server_name www.community.hypercube-evolution.de;
            server_name ipv4.community.hypercube-evolution.de;
            server_name "community.hypercube-evolution.de.212-227-91-81.siam-net.de";
    
            ssl_certificate             /usr/local/psa/var/certificates/scfbHTbkW;
            ssl_certificate_key         /usr/local/psa/var/certificates/scfbHTbkW;
            ssl_client_certificate      /usr/local/psa/var/certificates/scfLt0HmX;
    
            client_max_body_size 128m;
    
            root "/var/www/vhosts/hypercube-evolution.de/community.hypercube-evolution.de";
            access_log "/var/www/vhosts/system/community.hypercube-evolution.de/logs/proxy_access_ssl_log";
            error_log "/var/www/vhosts/system/community.hypercube-evolution.de/logs/proxy_error_log";
    
            #extension letsencrypt begin
            location ^~ /.well-known/acme-challenge/ {
                    root /var/www/vhosts/default/htdocs;
    
                    types { }
                    default_type text/plain;
    
                    satisfy any;
                    auth_basic off;
                    allow all;
    
                    location ~ ^/\.well-known/acme-challenge.*/\. {
                            deny all;
                    }
            }
            #extension letsencrypt end
    
            location / {
                    proxy_pass https://212.227.91.81:7081;
                    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_set_header X-Accel-Internal /internal-nginx-static-location;
                    access_log off;
    
            }
    
            location /internal-nginx-static-location/ {
                    alias /var/www/vhosts/hypercube-evolution.de/community.hypercube-evolution.de/;
                    internal;
            }
    
            location ~ ^/(plesk-stat|awstats-icon|webstat|webstat-ssl|ftpstat|anon_ftpstat) {
                    proxy_pass https://212.227.91.81:7081;
                    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_set_header X-Accel-Internal /internal-nginx-static-location;
                    access_log off;
    
            }
    
            location ~ ^/~(.+?)(/.*?\.php)(/.*)?$ {
                    alias /var/www/vhosts/hypercube-evolution.de/web_users/$1/$2;
                    fastcgi_split_path_info ^((?U).+\.php)(/?.+)$;
                    fastcgi_param PATH_INFO $fastcgi_path_info;
                    fastcgi_pass "unix:///var/www/vhosts/system/community.hypercube-evolution.de/php-fpm.sock";
                    include /etc/nginx/fastcgi.conf;
    
            }
    
            location ~ ^/~(.+?)(/.*)?$ {
                    proxy_pass https://212.227.91.81:7081;
                    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_set_header X-Accel-Internal /internal-nginx-static-location;
                    access_log off;
    
            }
    
            location ~ \.php(/.*)?$ {
                    fastcgi_split_path_info ^((?U).+\.php)(/?.+)$;
                    fastcgi_param PATH_INFO $fastcgi_path_info;
                    fastcgi_pass "unix:///var/www/vhosts/system/community.hypercube-evolution.de/php-fpm.sock";
                    include /etc/nginx/fastcgi.conf;
    
            }
    
            location ~ /$ {
                    index "index.html" "index.cgi" "index.pl" "index.php" "index.xhtml" "index.htm" "index.shtml";
            }
    
            add_header X-Powered-By PleskLin;
    
            include "/var/www/vhosts/system/community.hypercube-evolution.de/conf/vhost_nginx.conf";
    }
    

    and here the include

    location ~ / {
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_set_header X-Forwarded-Proto $scheme;
            proxy_set_header Host $http_host;
            proxy_set_header X-NginX-Proxy true;
    
            proxy_pass http://127.0.0.1:4567;
            proxy_redirect off;
    
            # Socket.IO Support
            proxy_http_version 1.1;
            proxy_set_header Upgrade $http_upgrade;
            proxy_set_header Connection "upgrade";
    }
    

Log in to reply
 

Suggested Topics

| |