proxy pass in openlitespeed
LiteSpeed Web Server doesn't support ProxyPass, ProxyPassReverse 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¶
Log into the LiteSpeed WebAdmin Console at
example.com:7080.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.- After saving, restart LSWS.
Virtual Host cloudvariation.in > External App
Web Server
| Name | nodejs |
| Address | localhost:3001 |
| Notes | Not Set |
| Max Connections | 2000 |
| Connection Keep-Alive Timeout | Not Set |
| Environment | Not Set |
| Initial Request Timeout (secs) | 1 |
| Retry Timeout (secs) | 5 |
| Response Buffering | No |
then in public html of domain name
REWRITERULE ^(.*)$ HTTP://nodejs/$1 [P]
nodejs is the app name that we used in above screenshot
Comments
Post a Comment