9/07/2021

nginx.conf, set to accept last path and poxy it.

 


ex)

www.xxx.yy/aaa/ping

www.xxx.yy/bbb/ping

Those urls will go to /ping proxy.


location ~ ^/.*/(ping|invocations) {
rewrite ^/.*/(.*)$ /$1 last;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_pass http://gunicorn/$1;
}

No comments:

Post a Comment