From 61043893f1a2bc259df8ba925bab59bcd4a3b3c5 Mon Sep 17 00:00:00 2001 From: Lakshmi Kannan Date: Thu, 4 Feb 2016 16:43:12 -0800 Subject: [PATCH] Ngnix rule for mistral_api redirect --- conf/nginx/st2.conf | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/conf/nginx/st2.conf b/conf/nginx/st2.conf index 566ed2330a..0fcebd3a5f 100644 --- a/conf/nginx/st2.conf +++ b/conf/nginx/st2.conf @@ -1,7 +1,7 @@ -# -# nginx configuration to expose st2 webui, redirect HTTP->HTTPS, +# +# nginx configuration to expose st2 webui, redirect HTTP->HTTPS, # provide SSL termination, and reverse-proxy st2api and st2auth API endpoint. -# To enable: +# To enable: # cp ${LOCATION}/st2.conf /etc/nginx/sites-available # ln -l /etc/nginx/sites-available/st2.conf /etc/nginx/sites-enabled/st2.conf # see https://docs.stackstorm.com/install.html for details @@ -62,6 +62,25 @@ server { proxy_set_header Host $host; } + location /mistral_api/ { + rewrite ^/mistral_api/(.*) /$1 break; + + proxy_pass http://127.0.0.1:8989/; + proxy_read_timeout 90; + proxy_connect_timeout 90; + proxy_redirect off; + + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + + proxy_set_header Connection ''; + chunked_transfer_encoding off; + proxy_buffering off; + proxy_cache off; + proxy_set_header Host $host; + } + location /auth/ { rewrite ^/auth/(.*) /$1 break;