-
Notifications
You must be signed in to change notification settings - Fork 363
websocket
yaoweibin edited this page Oct 27, 2011
·
8 revisions
tcp {
upstream backend1 {
server 192.168.0.1:2000;
}
upstream backend2 {
server 192.168.0.2:2000;
}
upstream backend3 {
server 192.168.0.3:2000;
}
server {
#default block if there is no host
listen 80 default;
server_name foo.example.com
websocket_pass backend1;
}
server {
listen 80;
#request from host name 'bar.example.com'
server_name bar.example.com
#default location process handler
websocket_pass backend2;
#the request from the path of 'cat'
websocket_pass /cat backend3;
}
}