From 8767788d3e46928bc53a3383617460445e396c9d Mon Sep 17 00:00:00 2001 From: Zachary Chai Date: Thu, 23 Feb 2017 11:58:51 -0500 Subject: [PATCH] add nginx config file --- scripts/greenlight.nginx | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 scripts/greenlight.nginx diff --git a/scripts/greenlight.nginx b/scripts/greenlight.nginx new file mode 100644 index 00000000..06786dac --- /dev/null +++ b/scripts/greenlight.nginx @@ -0,0 +1,23 @@ +# Routes requests to Greenlight based on the '/b' prefix + +location /b { + proxy_pass http://127.0.0.1:5000; + proxy_set_header Host $host; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + proxy_http_version 1.1; +} + +location /b/cable { + proxy_pass http://127.0.0.1:5000; + proxy_set_header Host $host; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "Upgrade"; + proxy_http_version 1.1; + proxy_read_timeout 6h; + proxy_send_timeout 6h; + client_body_timeout 6h; + send_timeout 6h; +}