Hello, I have created a domain on ISPConfig and i want to proxy/redirect to another server inside my network. I used apache directives in domain options and everything is working fine except that the target server is getting ispconfig IP only. Apache directives used (the latest now) are below on the server 192.168.15.2 i am only getting the IP of ISPConfig which is 192.168.44.16. Can anyone help me correct those directives so i can get the Client Real IP ?
You need to configure the settings at the server where ISPConfig redirects to not at the ISPConfig server if that is the proxy. As you did not explain what is running on the server behind the proxy we could only assume. If it is another apache2 webserver you could use mod_remoteip for example. I guess it's the most up to date solution for such cases.
As far as I know, it should be enough to just set "ProxyPreserveHost On" so that x-forwarded-for header is set. On the target system, you must then evaluate the x-forwarded-for header to get the IP address, if you want to have the x-forwarded-for address to show up in logs, you must use e.g. mod_remoteip as @pyte suggested. This is the same for any Apache server, so it's not ISPConfig specific.
Then you must check the synology docs if their software is able to deal with x-forwarded-for headers.
you really saved me time, I just had to check with Synology settings and I found that it has an option to for Trusted Proxies. I just added the WAN IP of ISPConfig and the Client IPs are showing correctly now.