0

I have a apache reverse proxy setting where I have to redirect all requests from abc.com to abc-test.com, the backend for this proxy is a AWS ALB. I have the below config which is not working:

ProxyRequests Off
ProxyPass /  https://internal-us-east-1.elb.amazonaws.com/ retry=0 connectiontimeout=300 timeout=300
ProxyPassReverse /  https://internal-us-east-1.elb.amazonaws.com
SSLProxyEngine on
SSLProxyVerify none
  <Proxy https://internal-us-east-1.elb.amazonaws.com/*>
    Order allow,deny
    Allow from all
  </Proxy>
ProxyPreserveHost On

RewriteEngine On
RewriteRule ^(.*)$ https://abc-test$1 [L,R]

I have multiple other virtual hosts in the same apache config with different backends, surprisingly the above vhost is being redirected to a different backend. Only having a redirect rule in vhost replicates this behavior else things are fine.

Any help on this would be appreciated.

2
  • I don't know if it makes a difference, but at least in the apache guides, both urls end with a slash /, which is missing in your ProxyPassReverse line. Commented Aug 4, 2021 at 15:13
  • Yes, but I have tried that but did not work, also similar config works on a different environment. Commented Aug 4, 2021 at 16:40

0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.