proxy pass in openlitespeed

 LiteSpeed Web Server doesn't support ProxyPassProxyPassReverse or other mod_proxy directives. However, you can use rewrite rules with [P] and set up an external app of the proxy in LSWS configuration to make it work fully.

Create an External App

  1. Log into the LiteSpeed WebAdmin Console at example.com:7080.

  2. Go to the Configuration > Server > External App tab and click Add. The external app can also be added at the virtual host level, but adding at server level is recommended.

Name - Any unique external app name. It should not start with "http://". For example, Local_proxy. * Address - The IP:PORT or UDS socket of the backend server. It cannot be a domain name. For example, the frontend is on port 443, and the backend is on ip:80, so you would enter the backend ip:80 here, replacing ip with the actual IP address. Please remember do not add "http://" or "https://" here. * Max Connections - The maximum number of concurrent connections to this Web Server at any time. * Initial Request Timeout (secs) - The maximum time in seconds the server will wait for a response. * Retry Timeout (secs) - The period of time that the server waits before retrying a request.

  1. After saving, restart LSWS.

Virtual Host cloudvariation.in > External App




Web Server

Namenodejs
Addresslocalhost:3001
NotesNot Set
Max Connections2000
Connection Keep-Alive TimeoutNot Set
EnvironmentNot Set
Initial Request Timeout (secs)1
Retry Timeout (secs)5
Response BufferingNo







then in public html of domain name


REWRITERULE ^(.*)$ HTTP://nodejs/$1 [P]

nodejs is the app name that we used in above screenshot
























Comments

Popular posts from this blog

cpanel exam CPSP Answers

How to install zimbra collaboration suite 8.8.11 on CentOS 7

awstats installation