0

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.

Ravikumar Tulugu
  • 1,702
  • 2
  • 18
  • 40
  • You might want to confirm there's no port conflict since you already have a localhost webserver listen at port 80. To check the issue, better share the configuration or screenshot. – Eric Dec 25 '21 at 13:38
  • There is no port conflict , the ssl webserver is running on 443 and the 2nd webserver is running on 8080. i am researching since yesterday and it seems i need rewrite rules along with the proxy context setup. it is not clear whether openlitespeed latest version supports proxypass and proxyreversepass. – Ravikumar Tulugu Dec 25 '21 at 14:17
  • 1
    Follow https://openlitespeed.org/kb/reverse-proxy-basics/ + Method 3 and it should work. OLS does not support proxypass. It's hard to help without knowing the config, maybe you can join golitespeed community on Slack (https://litespeedtech.com/slack/) for help. – Eric Dec 27 '21 at 03:00

1 Answers1

0

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]

Ravikumar Tulugu
  • 1,702
  • 2
  • 18
  • 40