Differences

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

Link to this comparison view

Next revision
Previous revision
litespeed_wiki:php_lsapi_command [2012/02/08 07:29]
127.0.0.1 external edit
litespeed_wiki:php_lsapi_command [2015/07/28 20:15]
Michael Alegre removed
Line 15: Line 15:
 ===== Setup ===== ===== Setup =====
  
-Typical setup is as follows:+==== Start lsphp from command line on remote server ====
  
-  * Start lsphp from command line on remote server+LSPHP is an executable and can be started manually and bound to IPv4, IPv6, or Unix domain socket addresses with the command line option ''​-b socket_address''​
  
-    PHP_LSAPI_MAX_REQUESTS=500 PHP_LSAPI_CHILDREN=35 /​path/​to/​lsphp -b IP_address:port+Examples:
  
-  * Setup LSAPI external app (such as '​remote php') and script handler (for php handled by '​remote php' ext app) on local web server.+Have LSPHP bind to port 3000 on all IPv4 and IPv6 addresses:
  
-    Admin CP => Configuration ​=> Server or Virtual Host => External App: +  /​path/​to/​lsphp -b [::]:3000 
-       address ​=> IP_address: port (in step above) + 
-       ​auto start => no+Have LSPHP bind to port 3000 on all IPv4 addresses:​ 
 + 
 +  /​path/​to/​lsphp -b *:3000 
 + 
 +Have LSPHP bind to address 192.168.0.2:​3000 : 
 + 
 +  /​path/​to/​lsphp -b 192.168.0.2:​3000 
 + 
 +Have LSPHP accept requests on Unix domain socket "/​tmp/​lsphp_manual.sock":​ 
 + 
 +  /​path/​to/​lsphp -b /​tmp/​lsphp_manual.sock  
 + 
 +Environment variables can be added before the LSPHP executable:​ 
 + 
 +  PHP_LSAPI_MAX_REQUESTS=500 PHP_LSAPI_CHILDREN=35 /​path/​to/​lsphp -b IP_address:​port 
 + 
 +==== Setup LSAPI external app and script handler ==== 
 + 
 +(WebAdmin console ​> Configuration > Server or Virtual Host > External App) 
 + 
 +Address ​=> IP_address: port (in step above) 
 +auto start => no
  
  
Line 60: Line 81:
  
   * For load balancing backend PHP setup, since PHP runs on different servers, a central shared PHP session storage like memcached, etc is recommended as LSWS load balancing is not session aware. An ideal set up is using LiteSpeed Load Balancer which is session aware in front of LiteSpeed web server clusters.   * For load balancing backend PHP setup, since PHP runs on different servers, a central shared PHP session storage like memcached, etc is recommended as LSWS load balancing is not session aware. An ideal set up is using LiteSpeed Load Balancer which is session aware in front of LiteSpeed web server clusters.
-