resolver does not seem to work with proxy_pass
SpolFirst SpolMiddle SpolLast
spol.pl at gmail.com
Tue Nov 3 05:53:31 UTC 2015
I have setup nginx (1.9.5) as a proxy for few tomcat servers through
proxy_pass directive. The proxy_pass points to a domain name (aws route53).
The proxying works okay, but domain name is resolved only during nginx
startup/reload. I have setup the resolver to force resolving domain name
every few seconds, but it does not work. Here is my config. Any thoughts
on why this does not work?
server {
listen 443;
server_name localhost;
ssl on;
resolver 10.0.0.2 valid=10s;
ssl_certificate /etc/nginx/certs/ssl-bundle3.crt;
ssl_certificate_key /etc/nginx/certs/chewie.key;
ssl_dhparam /etc/nginx/certs/dhparam.pem;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_session_cache shared:SSL:20m;
ssl_session_timeout 180m;
ssl_prefer_server_ciphers on;
ssl_ciphers "EECDH+ECDSA+AESGCM EECDH+aRSA+AESGCM
EECDH+ECDSA+SHA384 EECDH+ECDSA+SHA256 EECDH+aRSA+SHA384
EECDH+aRSA+SHA256 EECDH+aRSA+RC4 EECDH EDH+aRSA RC4 !aNULL !eNULL !LOW
!3DES !MD5 !EXP !PSK !SRP !DSS !RC4";
location / {
resolver_timeout 30s;
resolver 10.0.0.2 valid=10s;
set $target "http://abctest.hello.world:80";
proxy_pass $target;
proxy_cache_bypass true;
proxy_no_cache true;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For
$proxy_add_x_forwarded_for;
proxy_ssl_session_reuse on;
error_log /var/log/nginx/error.log debug;
}
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20151102/d167dadf/attachment.html>
More information about the nginx
mailing list