<div dir="ltr">you can get client ip, but you can't get client hostname. $host just your server hostname.</div><div class="gmail_extra"><br><div class="gmail_quote">2016-11-01 9:52 GMT+08:00 ngineo <span dir="ltr"><<a href="mailto:nginx-forum@forum.nginx.org" target="_blank">nginx-forum@forum.nginx.org</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">i am working on AWS Elastic Beanstalk Instance, which runs Java applicaiton<br>
servered through Nginx ( no load balancer in front, just a standalone<br>
instance )<br>
I need to set cookie to catch client ip and client hostname. Is this<br>
possible to do it in nginx and if yes then how?<br>
Below if my nginx configuration file:<br>
<br>
location / {<br>
proxy_pass <a href="http://127.0.0.1:5000" rel="noreferrer" target="_blank">http://127.0.0.1:5000</a>;<br>
proxy_http_version 1.1;<br>
<br>
proxy_set_header Connection $connection_upgrade;<br>
proxy_set_header Upgrade $http_upgrade;<br>
proxy_set_header Host $host;<br>
proxy_set_header X-Real-IP $remote_addr;<br>
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;<br>
}<br>
<br>
Posted at Nginx Forum: <a href="https://forum.nginx.org/read.php?2,270675,270675#msg-270675" rel="noreferrer" target="_blank">https://forum.nginx.org/read.<wbr>php?2,270675,270675#msg-270675</a><br>
<br>
______________________________<wbr>_________________<br>
nginx mailing list<br>
<a href="mailto:nginx@nginx.org">nginx@nginx.org</a><br>
<a href="http://mailman.nginx.org/mailman/listinfo/nginx" rel="noreferrer" target="_blank">http://mailman.nginx.org/<wbr>mailman/listinfo/nginx</a><br>
</blockquote></div><br></div>