server {
  listen      80;
  server_name example.com;
  access_log /var/log/nginx/example.com.access.log main;

  location / {
    access_log      off;
    proxy_pass http://localhost:8080;
    proxy_set_header X-Real-IP  $remote_addr;
    proxy_set_header Host $host;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  }
}

でおk。 via http://wiki.joyent.com/smartmachine:nginx_apache_proxy

X-Forwarded-For の他にも X-Real-IP や Host の設定もできる。