Does anyone know how to tell Apache, in reverse proxy mode, to intercept or catch 302 (or 30x) responses from the backend server and redirect internally without sending a 30x response to the client? Ultimately, the server server to which the response is redirected will not be accessible externally (or not specified in Apache conf).
My situation:
I have web_server_A and web_server_B listening on ports 6666 and 7777. These ports are not accessible from the outside, but are accessible from the inside.
Ultimately, I can change the behavior of web_server_A, but not web_server_B.
Apache listens on ports 80/443, accessible from the outside and acts as a reverse proxy server sending requests addressed to web_server_ {A, B} .example.com to web_server_ {A, B}
The client requests Apache for web_server_A.example.com/foo. Apache proxies a request to web_server_A, which does some things, and then sends back to Apache an HTTP / 302 response pointing to web_server_B.example.com/bar/secret_token. Apache sends a 302 response to the client, which then sends Apache an HTTP request to web_server_B.example.com/bar/secret_token. Apache proxies a request to web_server_B, which responds to something (usually it sends a large file back).
My problem:
I do not want the client to know about url web_server_B.example.com/bar/secret_token, and ultimately I do not want web_server_B to be accessible externally.
web_server_A web_server_B, web_server_B 302. web_server_B , , web_server_A ( ).
, "302 ", , , , . ?