From 690998874689f12545f931cf53a13f96eb7cc64f Mon Sep 17 00:00:00 2001 From: Kapil Viren Ahuja Date: Mon, 3 Apr 2017 11:40:56 +0530 Subject: added web sockets proxy --- nginx/nginx.conf | 45 +++++++++++++++++++++++++++------------------ 1 file changed, 27 insertions(+), 18 deletions(-) (limited to 'nginx/nginx.conf') diff --git a/nginx/nginx.conf b/nginx/nginx.conf index 97e5a0e..b6404b1 100644 --- a/nginx/nginx.conf +++ b/nginx/nginx.conf @@ -10,21 +10,30 @@ events { } http { - server_tokens off; - sendfile on; - tcp_nopush on; - tcp_nodelay on; - keepalive_timeout 15; - types_hash_max_size 2048; - client_max_body_size 20M; - include /etc/nginx/mime.types; - default_type application/octet-stream; - access_log /var/log/nginx/access.log; - error_log /var/log/nginx/error.log; - gzip on; - gzip_disable "msie6"; - include /etc/nginx/conf.d/*.conf; - include /etc/nginx/sites-available/*; - open_file_cache max=100; - charset UTF-8; -} + server_tokens off; + sendfile on; + tcp_nopush on; + tcp_nodelay on; + keepalive_timeout 15; + types_hash_max_size 2048; + client_max_body_size 20M; + include /etc/nginx/mime.types; + default_type application/octet-stream; + access_log /var/log/nginx/access.log; + error_log /var/log/nginx/error.log; + gzip on; + gzip_disable "msie6"; + include /etc/nginx/conf.d/*.conf; + include /etc/nginx/sites-available/*; + open_file_cache max=100; + charset UTF-8; + + map $http_upgrade $connection_upgrade { + default upgrade; + '' close; + } + + upstream websocket { + server 192.168.1.2:8010; + } +} \ No newline at end of file -- cgit v1.3.1