July 14, 2021 . 1 MIN READ
https://docs.litespeedtech.com/cp/cpanel/rewrite-proxy/
https://forum.openlitespeed.org/threads/create-external-application-via-a-config-file.4924/
https://www.litespeedtech.com/support/wiki/doku.php/litespeed_wiki:proxy:lsws-as-a-proxy-rewrite
If you see like this:
[REWRITE] Proxy target is not defined on external application list, please add a ‘web server’ with name ‘https://Local_proxy’
It means the proxy Local_proxy was not defined in an external application. You need to create a web server proxy on the external application named Local_proxy (without http:// or https://).
Alternatively, simply using the following code, an external app will be created by the server automatically:
RewriteEngine On RewriteRule ^(.*)$ https://127.0.0.1:5000/$1 [P,L]
# Editing this file manually might change litespeed behavior,
# Make sure you know what are you doing
index {
useServer 0
indexFiles index.php,index.html
}
scripthandler {
add lsapi:app-olsdiscountdeals php
}
extprocessor app-olsdiscountdeals {
type proxy
address 127.0.0.1:3000
maxConns 300
initTimeout 60
retryTimeout 60
respBuffer 1
}
context / {
type proxy
handler api
addDefaultCharset off
}
expires {
enableExpires 1
expiresByType image/*=A43200,text/css=A43200,application/x-javascript=A43200,application/javascript=A43200,font/*=A43200,application/x-font-ttf=A43200
}
rewrite {
enable 1
autoLoadHtaccess 1
}
context /home/runcloud/webapps/app-olsdiscountdeals/public/ {
allowBrowse 1
}