From d3826e5e3d07a6ba17b671788e4e1035c7d6320e Mon Sep 17 00:00:00 2001 From: Clifton Palmer Date: Mon, 20 Sep 2021 13:57:03 -0500 Subject: [PATCH] Set up nginx to do websocket proxy stuff for go --- nginx.conf | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/nginx.conf b/nginx.conf index 4ec3010..5a34455 100644 --- a/nginx.conf +++ b/nginx.conf @@ -15,7 +15,15 @@ http { server { server_name go.purplebirdman.com; location / { - proxy_pass http://go_web; + proxy_pass http://go_httpd; + proxy_set_header Host $host; + } + location /ws { + proxy_pass http://go_socket:3000; + # websocket magic + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "Upgrade"; proxy_set_header Host $host; } } -- 2.47.2