On Sat, Nov 07, 2020 at 04:39:52PM +0800, Lu Weitao wrote:
[why] we required access api by https request [how] use web-backend-nginx server to proxy srv-http server that user can access like: https://api.compass-ci.openeuler.org:11320/result/iozone/taishan200-2288-2s6...
Signed-off-by: Lu Weitao luweitaobe@163.com
container/web-backend-nginx/nginx.conf | 9 +++++++++ 1 file changed, 9 insertions(+)
diff --git a/container/web-backend-nginx/nginx.conf b/container/web-backend-nginx/nginx.conf index b461a2c..c9a4ec4 100644 --- a/container/web-backend-nginx/nginx.conf +++ b/container/web-backend-nginx/nginx.conf @@ -22,5 +22,14 @@ http { # web-backend server proxy_pass http://172.17.0.1:32767; }
location ~ ^/(result|pub) {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forward-For $proxy_add_x_forwarded_for;
# srv-http server
proxy_pass http://172.17.0.1:11300;
}}
}
这个会被反向代理到 https://api.xxx:11320/result https://api.xxx:11320/pub 不知道这样对吗?
Thanks, Zhang Yuhang
2.23.0