Welcome! Log In Create A New Profile

Advanced

nginx stream pass client ip address to backend

Posted by KpuCko 
nginx stream pass client ip address to backend
August 30, 2018 11:02AM
I have this configuration:

https://pastebin.com/rjKDaUPC

I use it to terminate SSL connection to port 443 on the public IP address, then redirect the SSL traffic to apache or VPN server based on hostname, this is knows as SSL preread.

Everything is fine, but on the apache I've got every request from client 127.0.0.1 which is the IP of the Nginx server. What i have to do to pass the real client ip address to the apache server.

Thanks a lot.
Re: nginx stream pass client ip address to backend
August 30, 2018 07:26PM
You could try using proxy protocol. Though I'm unsure about it in case of SSL connection.
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 114
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready