nginx 1.9.5 and realip
francis at daoine.org
Tue Sep 29 21:27:16 UTC 2015
On Sun, Sep 27, 2015 at 10:24:22AM -0700, Frank Liu wrote:
> Just tried latest 1.9.5 rpm that has realip module enabled. The
> $remote_port variable becomes blank. Is that known?
> Is there another way I can get the remote_port?
I think that there is not.
The connection comes from srcip:srcport to dstip:dstport.
By using the realip module, you ask nginx to replace srcip anywhere
where it might care what value it has.
Once you do that, I think that srcport is meaningless.
You can see the connecting ip:port in the debug log, on the accept:
line; so I guess that in principle, a module that ran before realip
(or a modified realip) could make it available somewhere. But I don't
think it can be done without getting code written.
Good luck with it,
Francis Daly francis at daoine.org
More information about the nginx