Forum

Reverse proxy Set up

David
19 January 2018, 07:35
Hi Hugo,
I am using reverse proxy to redirect users from one server to another server and getting the pattern match and moving to another host its fine but can we have that matched pattern attach to <host-url>. For example
original URL : www.example.com/<file-name>
as the <file-name> changes depends on the request can we copy the <file-name> from original url and attach to <host-url> like
host URL : www.newexample.com/<file-name>

OR

Do i have to make ReverseProxy statement for every filename individually

Thanks ;-)
Hugo Leisink
19 January 2018, 19:17
If you use an IP address in the ReverseProxy setting, the hostname is kept the same. If you use a hostname, the hostname in the Host HTTP header is replaced with that hostname. So, use the following setting:
VirtualHost
Hostname = www.example.com
ReverseProxy <pattern> http://www.newexample.com/
...
}
This topic has been closed.