[Seaside] Re: Nginx Reverse Proxying

Esteban A. Maringolo emaringolo at gmail.com
Fri Dec 13 03:26:25 UTC 2013


2013/12/12 Davorin Rusevljan <davorin.rusevljan at gmail.com>:
> On the other point, I would be a bit weary of proxying WebSockets, and I
> would be interested if it worked ok for you, and how. Maybe you would need
> to pay some attention to it in config, and/or use newer version of nginx to
> make it work.

Well it turned out to work pretty much out of the box according to
nginx documentation at http://nginx.org/en/docs/http/websocket.html.

I added this (websocket is an upstream configuration).

server {
        server_name ws2.mydomain.com;
        location / {
                proxy_pass http://websocket;
                proxy_http_version 1.1;
                proxy_set_header Upgrade $http_upgrade;
                proxy_set_header Connection "upgrade";
        }
}

I might play with having the websocket upstream as a subdirectory, ej:
mydomain.com/ws proxy_pass'ing everying to the upstream websocket.

But that will be once I fix the Authorization thing that's driving me nuts.

Regards!

Esteban A. Maringolo


More information about the seaside mailing list