Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | |||
litespeed_wiki:proxy:lsws-as-a-websocket-proxy [2020/01/08 23:08] qtwrk |
litespeed_wiki:proxy:lsws-as-a-websocket-proxy [2020/01/09 00:36] (current) Lisa Clarke [How to Configure LSWS in cPanel as a WebSocket Proxy] Proofreading |
||
---|---|---|---|
Line 34: | Line 34: | ||
===== How to Configure LSWS in cPanel as a WebSocket Proxy ===== | ===== How to Configure LSWS in cPanel as a WebSocket Proxy ===== | ||
- | LSWS supports ''ProxyPass'' for WebSocket , e.g. | + | LSWS supports ''ProxyPass'' for WebSocket, used like so: |
<code>ProxyPass / ws://localhost:3000/</code> | <code>ProxyPass / ws://localhost:3000/</code> | ||
- | This directive must be placed in apache vhost configuration file , not in .htaccess. | + | **Note**: This directive must be placed in an Apache vhost configuration file, not in .htaccess. |
- | Example for RocketChat , create below 2 files. | + | For example, for RocketChat, create two files like these, replacing ''EXAMPLE'' and ''www.example.com'' with the cPanel username and the actual domain: |
''/etc/apache2/conf.d/userdata/ssl/2_4/EXAMPLE/www.example.com/proxy.conf'' | ''/etc/apache2/conf.d/userdata/ssl/2_4/EXAMPLE/www.example.com/proxy.conf'' | ||
Line 46: | Line 46: | ||
''/etc/apache2/conf.d/userdata/std/2_4/EXAMPLE/www.example.com/proxy.conf'' | ''/etc/apache2/conf.d/userdata/std/2_4/EXAMPLE/www.example.com/proxy.conf'' | ||
- | replace ''EXAMPLE'' and ''www.example.com'' to the cPanel user and actual domain | + | Add the following code to both files: |
- | + | ||
- | Add following code to both of them | + | |
<code><IfModule mod_rewrite.c> | <code><IfModule mod_rewrite.c> | ||
Line 56: | Line 54: | ||
</IfModule></code> | </IfModule></code> | ||
- | rebuild Apache configuration file and restart LSWS | + | Rebuild the Apache configuration file, and restart LSWS: |
<code>/scripts/buildhttpdconf | <code>/scripts/buildhttpdconf | ||
/usr/local/lsws/bin/lswsctrl restart</code> | /usr/local/lsws/bin/lswsctrl restart</code> | ||
- | |||
- | |||
- | |||
===== Final Test: The Front End ===== | ===== Final Test: The Front End ===== |