Problem with setting reverse proxy

#1
Hello,
I refer to the how-tos (http://www.litespeedtech.com/how-tos.html#qa_sproxy)
I choose Define a Proxy Context with Web Server set to the External Application just defined to setup a.com as the reverse proxy.
In Ex. App. > Web Server Definition
Address:b.com:80 (b.com is hosted on a virtual hosting)
However,when I visit a.com
I just can see the default page of the ip of b.com
How can I solve it?
Thanks
 

webizen

Well-Known Member
#2
If b.com is a name based virtual host, you need to add rewrite rule to modify "Host" header value for the proxy as follows:

web site domain name is "www.example.com", it proxy request to backend, backend is defined as a web server with name "node1", it requires domain name to be "node1.example.com", the rewrite rule should be
RewriteRule? ^(.*)$ http://node1/$1 [P,E=Proxy-Host:node1.example.com]
 
Top