【发布时间】:2017-03-12 20:36:38
【问题描述】:
我使用 nginx 作为带有 ELB 的 reverse_proxy 服务器。我正在寻找有关我在 nginx.conf 文件中设置的解析器值的解释。我的 nginx.conf:
http {
...
resolver x.x.x.x valid=30s;
...
}
server {
...
set $elb "example.com";
location / {
...
rewrite ^/(.*) $1 break;
proxy_pass http://$elb/$1?$args;
...
}
...
}
我遵循了这个 - https://www.ruby-forum.com/topic/6816375#1166569 并将 /etc/resolv.conf 值设置为解析器值,它工作正常。这背后是什么?
【问题讨论】:
标签: nginx reverse-proxy resolver