OpenLiteSpeed as Reverse Proxy [ https ]

Cold-Egg

Administrator
#2
Hi,

It seems works from my testing on my testing server. I failed to switch apache default port 80/443 so I will just keep it and change OpenLiteSpeed listener port to 81/444 instead.

1. Apache with port 80
Code:
curl -Ik http://www.ols-example.tk:80/
HTTP/1.1 301 Moved Permanently
Date: Wed, 11 Dec 2019 16:47:05 GMT
Server: Apache/2.4.41 (Ubuntu)
Upgrade: h2,h2c
Connection: Upgrade
X-Redirect-By: WordPress
Location: http://www.ols-example.tk:444/
Content-Type: text/html; charset=UTF-8
2. Openlitespeed as reverse proxy with port 81
Code:
curl -Ik http://www.ols-example.tk:81/
HTTP/1.1 301 Moved Permanently
Upgrade: h2,h2c
X-Redirect-By: WordPress
Location: http://www.ols-example.tk:444/
Content-Type: text/html; charset=UTF-8
Date: Wed, 11 Dec 2019 16:47:12 GMT
Server: LiteSpeed
Connection: Keep-Alive
3. Apache with port 443
Code:
curl -Ik https://www.ols-example.tk:443/
HTTP/1.1 301 Moved Permanently
Date: Wed, 11 Dec 2019 16:47:25 GMT
Server: Apache/2.4.41 (Ubuntu)
Upgrade: h2,h2c
Connection: Upgrade
X-Redirect-By: WordPress
Location: https://www.ols-example.tk:444/
Content-Type: text/html; charset=UTF-8
4. Openlitespeed as reverse proxy with port 444
Code:
curl -Ik https://www.ols-example.tk:444/
HTTP/1.1 200 OK
Upgrade: h2,h2c
Link: <https://www.ols-example.tk:444/index.php?rest_route=/>; rel="https://api.w.org/"
Content-Type: text/html; charset=UTF-8
Date: Wed, 11 Dec 2019 16:47:27 GMT
Server: LiteSpeed
Alt-Svc: quic=":444"; ma=2592000; v="39,43,46", h3-Q039=":444"; ma=2592000, h3-Q043=":444"; ma=2592000, h3-Q046=":444"; ma=2592000, h3-23=":444"; ma=2592000, h3-24=":444                    "; ma=2592000
Connection: Keep-Alive
You can try to set debug level to High see if any error log shows.

Best,
Eric
 

Cold-Egg

Administrator
#4
HIHI,

You can set OpenLiteSpeed to use port 80/443 and Apache use other ports of course. What I mean in my test is that I failed to change Apache's default port number for some reason, so I changed OpenLitespeed port instead. And test result indicated that there's no 500 or other error when OpenLiteSpeed run as reverse proxy.

Best,
Eric
 
Top