gevent-socketio icon indicating copy to clipboard operation
gevent-socketio copied to clipboard

ha-proxy/1.4.18 & nginx/1.5.6 don't work

Open keiser1080 opened this issue 11 years ago • 3 comments

Ha-rpoxy tested with last live_cpu_graph & simple_chat the request to the script but no answer

Same problem with nginx proxy

127.0.0.1 - - [2013-11-11 23:59:47] "GET /socket.io/1/websocket/425028540892 HTTP/1.1" 101 - - 127.0.0.1 - - [2013-11-11 23:59:51] "GET /socket.io/1/websocket/434030960726 HTTP/1.1" 101 - - 127.0.0.1 - - [2013-11-12 00:00:46] "GET /socket.io/1/websocket/788614352574 HTTP/1.1" 101 - - 127.0.0.1 - - [2013-11-12 00:01:47] "GET /socket.io/1/websocket/692060979954 HTTP/1.1" 101 - - 127.0.0.1 - - [2013-11-12 00:02:47] "GET /socket.io/1/websocket/14870453095 HTTP/1.1" 101 - -

keiser1080 avatar Nov 11 '13 23:11 keiser1080

@keiser1080 I have this working with nginx without problems.

My config:

upstream backend {
    server 127.0.0.1:8000;
}

server {
    #listen   80; ## listen for ipv4; this line is default and implied
    #listen   [::]:80 default ipv6only=on; ## listen for ipv6

    root /usr/share/nginx/www;
    index index.html index.htm;

    # Make site accessible from http://localhost/
    server_name localhost;

    location / {
            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 true;

            proxy_pass http://backend/;
            proxy_redirect off;

        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
     }

    location /static/ {
        alias /vagrant/static_collected/;
    }   

    location /doc/ {
        alias /usr/share/doc/;
        autoindex on;
        allow 127.0.0.1;
        deny all;
    }
}

darkness51 avatar Dec 17 '13 17:12 darkness51

@Carlos thanks for your feedback

2013/12/17 Carlos Aguilar [email protected]

@keiser1080 https://github.com/keiser1080 I have this working with nginx without problems.

My config:

upstream backend { server 127.0.0.1:8000; }

server { #listen 80; ## listen for ipv4; this line is default and implied #listen [::]:80 default ipv6only=on; ## listen for ipv6

root /usr/share/nginx/www;
index index.html index.htm;

# Make site accessible from http://localhost/
server_name localhost;

location / {
        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 true;

        proxy_pass http://backend/;
        proxy_redirect off;

    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "upgrade";
 }

location /static/ {
    alias /vagrant/static_collected/;
}

location /doc/ {
    alias /usr/share/doc/;
    autoindex on;
    allow 127.0.0.1;
    deny all;
}

}

— Reply to this email directly or view it on GitHubhttps://github.com/abourget/gevent-socketio/issues/167#issuecomment-30770365 .

keiser1080 avatar Dec 17 '13 18:12 keiser1080

proxy_buffering off; missing that option

ArEnSc avatar Mar 20 '14 17:03 ArEnSc