Cool, that works! I don't understand why though, why is the uri urldecoded in my example but not in your example? Also, I actually want the dns resolution to take place because I'm running in an AWS environment.. Thanks / Jonasby luckyswede - Nginx Mailing List - English
Also, I want to make use of a resolver, which requires variables in the proxy_pass directive. Does this mean that it is not possible to automatically "strip" out the leading "/api" (which seems to not work with variables) and using resolvers (which requires variables)? BR / Jonasby luckyswede - Nginx Mailing List - English
Hi, I've had troubles with url-decoding using this kind configuration, e.g. get variables with values containing spaces have been decoded before proxied which is resulting in an error. For example I've tried: location ~ ^/api/(.*) { proxy_pass http://api.$host/$1$is_args$args; } but that gives an error if the uri is urlencoded. Any ideas? BR / Jonasby luckyswede - Nginx Mailing List - English
Thanks, But I want to automatically remove the "/api" part, just as it does if I don't use variables. So that isn't possible? BR / Jonasby luckyswede - Nginx Mailing List - English
Hi, I have a conf with two virtual hosts and a proxy-pass that is dependent on which host the request arrived to, like this: server { listen 80; server_name x.com y.com; resolver 8.8.8.8; root /var/www/html; location / { # whatever } location /api/ { proxy_pass http://api.$host/; proxy_set_heby luckyswede - Nginx Mailing List - English