Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Last revision Both sides next revision
litespeed_wiki:cloudlinux:node.js_selector [2020/01/09 19:29]
Jackson Zhang [LSWS Node.js Selector Support Out of the Box]
litespeed_wiki:cloudlinux:node.js_selector [2020/01/29 15:11]
Shivam Saluja [Troubleshooting]
Line 10: Line 10:
 Node.js Selector from Cloudlinux is supported by LiteSpeed Web Server out of the box without any extra configuration required on LSWS side. You will need to follow the instructions in the CloudLinux Node.js selector to make your node.js app working with Apache first before switching to LSWS. You can refer to the [[https://​docs.cloudlinux.com/​index.html?​node_js_selector.html|official CloudLinux documentation]]. Node.js Selector from Cloudlinux is supported by LiteSpeed Web Server out of the box without any extra configuration required on LSWS side. You will need to follow the instructions in the CloudLinux Node.js selector to make your node.js app working with Apache first before switching to LSWS. You can refer to the [[https://​docs.cloudlinux.com/​index.html?​node_js_selector.html|official CloudLinux documentation]].
  
-===== How LiteSpeed ​works with Node.js selector? ​===== +===== How LiteSpeed ​Works with NodeJS Selector ​===== 
-For NodeJS application managed by CloudLinux NodeJS selector, LSWS does automatic ''​ws://''​ proxy to nodejs ​backend if the request does WebSocket upgrade. No extra configuration required.+ 
 +For NodeJS application managed by CloudLinux NodeJS selector, LSWS does an automatic ''​<​nowiki>​ws://</​nowiki>​''​ proxy to the NodeJS ​backendif the request does WebSocket upgrade. No extra configuration required
 + 
 +When direct connecting to a NodeJS server, test with  
 +<​code>​ws://​...</​code>​.  
 + 
 +When going through a LSWS HTTPS proxy server, use  
 +<​code>​wss://​...</​code>​.  
 + 
 +When a NodeJS server is started through LSWS NodeJS selector integration (mod_passenger),​ the TCP socket is replaced with an auto-generated Unix domain socket, hence direct access the TCP port may fail.
  
-When direct connecting to NodeJS server, test with ''​ws://​...''​ URL; when going through LSWS HTTPS proxy server, use ''​wss://​...''​ URL. 
-When a NodeJS server was started through LSWS NodeJS selector integration (mod_passenger),​ the TCP socket is replaced with an auto-generated Unix domain socket, hence direct access the TCP port may fail. 
 ===== How to Test Node.js with LSWS ===== ===== How to Test Node.js with LSWS =====
  
Line 38: Line 45:
  
 Note that any port specifications in the listen function are ignored. ​ The server is processed by the Node.js function of LiteSpeed automatically. Note that any port specifications in the listen function are ignored. ​ The server is processed by the Node.js function of LiteSpeed automatically.
 +
 ===== Troubleshooting ===== ===== Troubleshooting =====
  
Line 47: Line 55:
  
 You can also verify that the '​Litespeed Node.js Service'​ is running. ​ From a command prompt enter: You can also verify that the '​Litespeed Node.js Service'​ is running. ​ From a command prompt enter:
-<​code>​ps -ef|grep ​Node</​code>​+<​code>​ps -ef|grep ​node</​code>​
  
-One of the displayed running processes should be <​code>​Litespeed Node.js Service</​code>​+One of the displayed running processes should be shown like this <​code>​lsnode:/​home/​USER/​public_html/​APPDIR/​</​code>​
  
 When troubleshooting,​ you may want to bring up a stand-alone Node.js server and verify that the software works through //that//, to be sure that the problem is not in the Javascript itself. When troubleshooting,​ you may want to bring up a stand-alone Node.js server and verify that the software works through //that//, to be sure that the problem is not in the Javascript itself.
  
  • Admin
  • Last modified: 2023/03/25 13:38
  • by Lisa Clarke