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:php:lsapi-command-line-mode [2018/09/14 16:10]
Michael Alegre [Start lsphp from command line on remote server]
litespeed_wiki:php:lsapi-command-line-mode [2018/09/18 21:29] (current)
Michael Alegre [Note]
Line 8: Line 8:
 ===== Summary ===== ===== Summary =====
  
-LSPHP(LSAPI + PHP) command line mode is for PHP binary ​running on a remote server that does not necessarily have web server running ​to process PHP scripts reside on local web server (separate)This setup is suitable for service scalability as PHP processing is offloaded ​to a remote server.+Usually, ​LSPHP(LSAPI + PHP) is managed by LiteSpeed Web Server. In a clustered environment,​ though, with a single LiteSpeed Web Server or LiteSpeed Web ADC load balancing LSPHP processes ​running on multiple backend servers, it may be necessary ​to start LSPHP processes manuallyLSPHP 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''​
  
  
Line 16: Line 16:
  
 ==== 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''​ 
  
 Examples: Examples:
Line 43: Line 41:
 ==== Setup LSAPI external app and script handler ==== ==== Setup LSAPI external app and script handler ====
  
-**WebAdmin ​console ​> Configuration > Server or Virtual Host > External App**+**WebAdmin ​Console ​> Configuration > Server or Virtual Host > External App**
  
 **Address** => ''​IP_address:​ port''​ (in step above)\\ **Address** => ''​IP_address:​ port''​ (in step above)\\
Line 76: Line 74:
   * PHP scripts on local web server need to be rsync'​d over to the remote server with exact path.   * PHP scripts on local web server need to be rsync'​d over to the remote server with exact path.
  
-  * If local web server is chroot'​d,​ then chroot needs to map to file system root of the remote server. e.g. if web server chroot is /​usr/​local/​opt,​ then /​usr/​local/​opt/​lsws/​DEFAULT/​html (default lsws vhost docroot) needs to be rsync'​d over and placed on remote server as /​lsws/​DEFAULT/​html.+  * If local web server is chroot'​d,​ then chroot needs to map to file system root of the remote server. e.g. if web server chroot is ''​/​usr/​local/​opt''​, then ''​/​usr/​local/​opt/​lsws/​DEFAULT/​html'' ​(default lsws vhost docroot) needs to be rsync'​d over and placed on remote server as ''​/​lsws/​DEFAULT/​html''​.
  
-  * If no chroot, then /​usr/​local/​lsws/​DEFAULT/​html should be rsync'​d over as /​usr/​local/​lsws/​DEFAULT/​html.+  * If no chroot, then ''​/​usr/​local/​lsws/​DEFAULT/​html'' ​should be rsync'​d over as ''​/​usr/​local/​lsws/​DEFAULT/​html''​.
  
   * 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.
 
litespeed_wiki/php/lsapi-command-line-mode.1536941456.txt.gz · Last modified: 2018/09/14 16:10 by Michael Alegre