openlitespeed

openlitespeed reverse proxy setup ssl termination


I am trying to setup a openlitespeed reverse proxy. openlitespeed is a https:// end point and then for certain URI's, it is supposed to call in to another webserver running on localhost, the 2nd webserver is simple http://. i am following the openlitespeed guide and things seem not working.

on the webadmin, i have added context type proxy and an external app given the ip address and port.

Are rewrite rules required to rewrite URI from https:// to http:// ?? for some reason the "accessible" field for the proxy context always shows as "Not Set". I am not sure how to get this Set.


Solution

  • Adding a proxy is not enough , we have to add rewrite rules as well. here are the rules below.

    Also CORS header needs to be added in the headers section if the domain names are not same.

    RewriteEngine On RewriteCond %{HTTPS} =on RewriteCond %{REQUEST_URI} =/web/comments/* RewriteRule (.*) http://%{SERVER_NAME}:8080/$1 [R,L]