diff --git a/apisix/cli/ngx_tpl.lua b/apisix/cli/ngx_tpl.lua index 18f663277980d..f97741f2765ef 100644 --- a/apisix/cli/ngx_tpl.lua +++ b/apisix/cli/ngx_tpl.lua @@ -317,7 +317,7 @@ http { # admin configuration snippet ends set $upstream_scheme 'http'; - set $upstream_host $host; + set $upstream_host $http_host; set $upstream_uri ''; location /apisix/admin { @@ -410,7 +410,7 @@ http { # http server configuration snippet ends set $upstream_scheme 'http'; - set $upstream_host $host; + set $upstream_host $http_host; set $upstream_uri ''; set $ctx_ref ''; diff --git a/benchmark/fake-apisix/conf/nginx.conf b/benchmark/fake-apisix/conf/nginx.conf index 124008dc4516c..9ae60d248141b 100644 --- a/benchmark/fake-apisix/conf/nginx.conf +++ b/benchmark/fake-apisix/conf/nginx.conf @@ -84,7 +84,7 @@ http { location / { set $upstream_scheme 'http'; - set $upstream_host $host; + set $upstream_host $http_host; set $upstream_upgrade ''; set $upstream_connection ''; set $upstream_uri ''; diff --git a/t/APISIX.pm b/t/APISIX.pm index 9dcea3aaf04fe..de8822402016d 100644 --- a/t/APISIX.pm +++ b/t/APISIX.pm @@ -480,7 +480,7 @@ _EOC_ } set \$upstream_scheme 'http'; - set \$upstream_host \$host; + set \$upstream_host \$http_host; set \$upstream_uri ''; set \$ctx_ref ''; set \$dubbo_service_name '';