While I was able to successfully configure nginx to proxy HTTP traffic (using this guide), all attempts to proxy HTTPS requests resulted in code 400 (Bad Request).
Nginx debug logs weren't helpful at all:
2013/06/05 14:38:33 [info] 74946#0: *589 client sent invalid request while reading client request line, client: 127.0.0.1, server: google.com, request: "CONNECT google.com:443 HTTP/1.1"
What are these
CONNECT requests? Is it even possible to
proxy_pass HTTPS requests in nginx?
Also nginx's config language is arguably a programming language in it's own right. It has variables!