From 9d3e370e5f1f86326a49f8eca832c523f573ba33 Mon Sep 17 00:00:00 2001 From: Kapil Viren Ahuja Date: Thu, 6 Apr 2017 18:23:38 +0530 Subject: WS is now going via notif subdomain instead of localhost --- docker-compose.yml | 2 +- nginx/sites/notif.vainsocial.dev.conf | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 nginx/sites/notif.vainsocial.dev.conf diff --git a/docker-compose.yml b/docker-compose.yml index 07d85dd..d6e936f 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -86,7 +86,7 @@ services: - php-fpm - vaindock_queue ports: - - "88:80" + - "80:80" - "443:443" vaindock_bridge: diff --git a/nginx/sites/notif.vainsocial.dev.conf b/nginx/sites/notif.vainsocial.dev.conf new file mode 100644 index 0000000..034decc --- /dev/null +++ b/nginx/sites/notif.vainsocial.dev.conf @@ -0,0 +1,13 @@ +server { + + listen 80; + listen [::]:80; + + server_name notif.vainsocial.dev; + + location / { + proxy_pass http://websocket; + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection $connection_upgrade; } +} -- cgit v1.3.1 From 90dfd65538d09a78bffe64b4424bfb7c91bbeab4 Mon Sep 17 00:00:00 2001 From: Kapil Viren Ahuja Date: Mon, 10 Apr 2017 12:26:30 +0530 Subject: Setup nginx to support /bridge --- nginx/nginx.conf | 4 ++++ nginx/sites/notif.vainsocial.dev.conf | 3 ++- nginx/sites/vainsocial.dev.conf | 17 ++++++++++++++++- 3 files changed, 22 insertions(+), 2 deletions(-) diff --git a/nginx/nginx.conf b/nginx/nginx.conf index c6a9581..52a924c 100644 --- a/nginx/nginx.conf +++ b/nginx/nginx.conf @@ -37,4 +37,8 @@ http { # server 192.168.1.37:15674; server vaindock_queue:15674; } + + upstream bridge { + server vaindock_bridge:8880; + } } diff --git a/nginx/sites/notif.vainsocial.dev.conf b/nginx/sites/notif.vainsocial.dev.conf index 034decc..2ba3b01 100644 --- a/nginx/sites/notif.vainsocial.dev.conf +++ b/nginx/sites/notif.vainsocial.dev.conf @@ -9,5 +9,6 @@ server { proxy_pass http://websocket; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection $connection_upgrade; } + proxy_set_header Connection $connection_upgrade; + } } diff --git a/nginx/sites/vainsocial.dev.conf b/nginx/sites/vainsocial.dev.conf index f32b01c..7760861 100644 --- a/nginx/sites/vainsocial.dev.conf +++ b/nginx/sites/vainsocial.dev.conf @@ -8,7 +8,22 @@ server { index index.php index.html index.htm; location /bridge { - proxy_pass http://192.168.1.34:8880/api; + # proxy_pass http://192.168.1.34:8880/api; + proxy_pass http://bridge/api; + } + + location /ws { + proxy_pass http://websocket; + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection $connection_upgrade; + } + + location /stomp { + proxy_pass http://websocket; + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection $connection_upgrade; } location / { -- cgit v1.3.1