I am new to Apache Httpd server and trying to configure the reverse proxy for an external site and below is my configuration:
SSLProxyEngine on
RewriteEngine on
ProxyPassMatch ^/(.*)$ https://abc.xyz.com/$1
ProxyPassReverse ^/(.*)$ https://abc.xyz.com/$1
RewriteRule /login-callback https://abc.xyz.com/login-callback"
When I an running httpd.exe
and in browser when I am trying to browse http://localhost
I can successfully proxy to the landing page of external site https://abc.xyz.com
.
Now in landing page I have login
button which will redirecting it to other site correctly but in redirect_uri
it's appending http://localhost/login-callback
like below,
https://PQR.xyz.com/oauth2/auth?client_id=my-client-id&code_challenge=lVv_PrQDR_m4Trw5ocYk5zaauGZZGU6EsIgJdmCOe20&code_challenge_method=S256&redirect_uri=http://localhost/login-callback&response_type=code
whereas It's should be https://abc.xyz.com/login-callback
Question: How can I persist the redirect_uri
with https://abc.xyz.com/
instead of http://localhost
?