【結論】
proxy_set_header : proxy_pass => currentレベル合わせる
=> 別に合わせなくても良かったという・・・なんでだ?
【結果】
nginx.conf
proxy_set_header X-Real-IP $remote_addr;
location / {
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://localhost:8181;
}
["HTTP_HOST"]=>
string(9) "localhost"
["HTTP_X_FORWARDED_HOST"]=>
string(9) "localhost"
["HTTP_X_FORWARDED_SERVER"]=>
string(9) "localhost"
["HTTP_X_FORWARDED_FOR"]=>
string(9) "127.0.0.1"
=> X-Real-IP無し
【参考】
<>