ReverseProxy: Send hostname upstream

fatzopilot nginx-forum at
Fri Dec 16 21:52:44 UTC 2011


I guess it is rather simple, but I am more of a coder than of an admin
so not an expert in configuring webservers. I'd like to proxy an akamai
proxy which relies on the full hostname being passed (IP is not

server {
  listen 80;
##  ssl on;
  location / {
   proxy_set_header Host $host;
   access_log  /var/log/nginx/upstream.log  upstream;
To debug, I configured an upstream log like described here:

It seems, nginx is resolving the upstream host's DNS-Address and uses
the IP in all upstream requests (ommitting the hostname) which is not
enough for the upstream host to answer correctly.

How to forward the upstream hostname (here: as


Posted at Nginx Forum:,220185,220185#msg-220185

More information about the nginx mailing list