Welcome! Log In Create A New Profile

Advanced

Re: setting up client ip and hostname in nginx?

dec w
November 01, 2016 11:34PM
you can get client ip, but you can't get client hostname. $host just your
server hostname.

2016-11-01 9:52 GMT+08:00 ngineo <nginx-forum@forum.nginx.org>:

> i am working on AWS Elastic Beanstalk Instance, which runs Java applicaiton
> servered through Nginx ( no load balancer in front, just a standalone
> instance )
> I need to set cookie to catch client ip and client hostname. Is this
> possible to do it in nginx and if yes then how?
> Below if my nginx configuration file:
>
> location / {
> proxy_pass http://127.0.0.1:5000;
> proxy_http_version 1.1;
>
> proxy_set_header Connection $connection_upgrade;
> proxy_set_header Upgrade $http_upgrade;
> proxy_set_header Host $host;
> proxy_set_header X-Real-IP $remote_addr;
> proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
> }
>
> Posted at Nginx Forum: https://forum.nginx.org/read.
> php?2,270675,270675#msg-270675
>
> _______________________________________________
> nginx mailing list
> nginx@nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
>
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

setting up client ip and hostname in nginx?

ngineo October 31, 2016 09:52PM

Re: setting up client ip and hostname in nginx?

dec w November 01, 2016 11:34PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 154
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready