Search code examples
apache2proxypass

Apache2 Proxy Pass Include all parameters on URL


Is it possible to have a proxy pass on Apache2 that also carries the parameters passed to backend servers?

Example:

www.frontserver.com -> www.frontserver.com (meaning that on the base directory it will not be proxied to any backend servers.)

It will be proxied IF it's under /_nuxt Directory

www.frontserver.com/_nuxt/index.js -> backserver.com/_nuxt/index.js (dynamicaly)

Solution

  • You can use ProxyPassMatch which match regular expression

    ProxyPassMatch "^_nuxt/(.*)" "http://backserver.com/_nuxt/$1"