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
Next revision Both sides next revision
litespeed_wiki:nodejs_setup [2014/12/28 21:16]
George Wang [Proxy Node.js Traffic]
litespeed_wiki:nodejs_setup [2014/12/28 21:23]
George Wang [Proxy Node.js Traffic]
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 web server.  
 + 
 +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 ====