0

Good day,

I have the flow as follow:

(public ip) 192.168.0.142 --> (192.168.111.66) web server --> (192.168.1.199) java web app server

In my 192.168.111.66 Apache web server, I have configure the following in my httpd.conf:

ProxyPass "/image.web" "https://192.168.1.199/image.web"
ProxyPassReverse "/image.web" "https://192.168.1.199/image.web"

The network successfully reach to my web app server (192.168.1.199), however, in my java web application, I saw the request is servername is 192.168.1.199, I believe this is because of my configuration in Apache Web Server, May I know how can I configure, so that in my java web application, I can detect the request servername is 192.168.0.142, which is the public ip.

2

Just found the answer:

ProxyPreserveHost On

https://httpd.apache.org/docs/2.4/mod/mod_proxy.html#proxypreservehost

| improve this answer | |
  • 1
    Consider accepting your own answer :) – LeRouteur Oct 13 at 6:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.