tengine domain in variable not process by nginx resover server

w41d8nur  于 2021-12-26  发布在  Java
关注(0)|答案(0)|浏览(207)

Ⅰ. Issue Description

tengine version 2.3.2
nginx and dns config as following:

$ cat nginx.conf
...
resolver 10.254.0.2 valid=30s;
server {
    listen          80;
    server_name dns.test.successchannel.cn;
    location / {
        set $bak "http://www.baidu.com";
        proxy_pass $bak;
    }
}
...
$cat /etc/nginx/resolve.conf
nameserver 8.8.8.8

10.254.0.2 is our dns server, when we visit varirable $bak which contain "www.baidu.com" ,
"www.baidu.com" will not resolved by 10.254.0.2 , it resolved by 8.8.8.8

Ⅱ. Describe what happened

Ⅲ. Describe what you expected to happen

we expect varirable $bak which contain "www.baidu.com" will resolve by 10.254.0.2 ,but not 8.8.8.8

Ⅳ. How to reproduce it (as minimally and precisely as possible)

Ⅴ. Anything else we need to know?

Ⅵ. Environment:

centos7.4

  • Tengine version (use sbin/nginx -V):

2.3.2

  • OS (e.g. from /etc/os-release):

NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="7"
PRETTY_NAME="CentOS Linux 7 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:7"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"

CENTOS_MANTISBT_PROJECT="CentOS-7"
CENTOS_MANTISBT_PROJECT_VERSION="7"
REDHAT_SUPPORT_PRODUCT="centos"
REDHAT_SUPPORT_PRODUCT_VERSION="7"

  • Kernel (e.g. uname -a):

Linux ip-192-168-0-217 3.10.0-693.el7.x86_64 #1 SMP Tue Aug 22 21:09:27 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

  • Others:

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题