Sample Header Ad - 728x90

configure redirect rules in a apache reverse proxy

0 votes
0 answers
774 views
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:
abc.com
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
  
    Order allow,deny
    Allow from all
  
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.
Asked by Karthik K (421 rep)
Aug 4, 2021, 03:05 PM
Last activity: Aug 4, 2021, 03:08 PM