Contents

Nginx配置resolver

Contents

前言

没得前言,就一个简单记录

配置

次该nginx配置文件,格式如下:

http {  

    resolver X.X.X.X valid=5s;

    server {

        server_name www.example.com;
        set $dn "foo.dnsalias.net"; 

        location / {
            proxy_pass http://$dn;
            ...
        }

    }

}