Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Last revision Both sides next revision | ||
litespeed_wiki:php:lsapi-command-line-mode [2018/09/13 20:41] Michael Alegre [Setup LSAPI external app and script handler] |
litespeed_wiki:php:lsapi-command-line-mode [2018/09/18 21:27] Michael Alegre [Setup LSAPI external app and script handler] |
||
---|---|---|---|
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 manually. 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'' |
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 37: | Line 35: | ||
/path/to/lsphp -b /tmp/lsphp_manual.sock | /path/to/lsphp -b /tmp/lsphp_manual.sock | ||
- | Environment variables (please check [[litespeed_wiki:php:lsapi-environment-variables#environment_variables_configurable_at_lsphp_external_apps|here]] for a list of supported variables) can be added before the LSPHP executable. The `PHP_LSAPI_CHILDREN=nn` is required when run lsphp as a service to handle concurrent requests, `nn` should be, minimum, the concurrent level required by the frontend. It is running PHP in process group mode. Note the following are only example figures, and you should adjust it to meet your need. | + | Environment variables (please check [[litespeed_wiki:php:lsapi-environment-variables#environment_variables_configurable_at_lsphp_external_apps|here]] for a list of supported variables) can be added before the LSPHP executable. The `PHP_LSAPI_CHILDREN=nn` is required when run lsphp as a service to handle concurrent requests, `nn` should be, minimum, the concurrent level required by the frontend. It is running PHP in ProcessGroup mode. Note the following are only example figures, and you should adjust it to meet your need. |
PHP_LSAPI_MAX_REQUESTS=5000 PHP_LSAPI_CHILDREN=35 /path/to/lsphp -b IP_address:port | PHP_LSAPI_MAX_REQUESTS=5000 PHP_LSAPI_CHILDREN=35 /path/to/lsphp -b IP_address:port | ||
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)\\ |