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
litespeed_wiki:nodejs_setup [2014/12/28 21:16]
George Wang [Proxy Node.js Traffic]
litespeed_wiki:nodejs_setup [2015/07/28 21:28]
Michael Alegre removed
Line 32: Line 32:
   RewriteEngine On   RewriteEngine On
   RewriteCond %{REQUEST_FILENAME} !-f   RewriteCond %{REQUEST_FILENAME} !-f
-  RewriteCond %{REQUEST_FILENAME} !-d 
   RewriteRule ^(.*)$ http://​example.com:​1337/​$1 [P,L]   RewriteRule ^(.*)$ http://​example.com:​1337/​$1 [P,L]
  
-The above example redirects all traffic (after checking that it is a directory or file) to port 1337 (where ''​example.js''​ is running, as noted above).+The above example redirects all traffic (after checking that it is a directory or file) to port 1337 (where ''​example.js''​ is running, as noted above). ​Static files are still served by LSWS.  
 + 
 +If there is no need to serve static files through LSWS, you can let LSWS proxy all requests to backend application server with rewrite rule 
 + 
 +  RewriteEngine On 
 +  RewriteRule ^(.*)$ http://​example.com:​1337/​$1 [P,L]
  
 ==== If Using LSWS Below 4.2.13 or Proxying to an External Server ==== ==== If Using LSWS Below 4.2.13 or Proxying to an External Server ====