I'm configuring Apache 2.4 to run as a reverse proxy for several applications.
One of these is Artifactory, which says I should use Apache to set a header ( the header is: X-Artifactory-Override-Base-Url) in the request when using configuring Artifactory behind an Apache reverse proxy (https://www.jfrog.com/confluence/display/RTF/Configuring+a+Reverse+Proxy).
I have one virtual host which proxies requests to the different applications based on the context path in the URL. So https://apache-proxy.com/artifactory would go to the Artifactory app. /app2 would go to application 2 and so on.
My question is: How do I only set the X-Artifactory-Override-Base-Url
header for requests that are meant for Artifactory?
I was trying to use an If statement that would see if the URI contains Artifactory, like this:
<If "%{REQUEST_URI} == '^/artifactory*'">
RequestHeader set X-Artifactory-Override-Base-Url https://apache-proxy.com/artifactory
</If>
Is this correct? Or is there a better way to do this? Any help appreciated!