|| ユーザフォーラムで議論/質問 | マニュアル検索 | ハイライト | ハイライトオフ | ポータル | php spot|
LiteSpeed Web Server/OpenLiteSpeed Web Server on Unix systems
LiteSpeed PHP is an optimized compilation of PHP built to work with LiteSpeed products through the LiteSpeed SAPI. LSPHP runs as its own process and has its own standalone binary, which can be used as a simple command line binary to execute PHP scripts from the command line.
The LSAPI is a highly optimized API that allows communication between LiteSpeed and third party web engines. Its protocol is similar to FCGI, but is more efficient.
This documentation will cover installing and configuring PHP with LSAPI for a LiteSpeed Web Server and OpenLiteSpeed Web Server.
This guide will assume that either LSWS or OLS is installed with their default paths and flags. The default installation directory for both web servers is /usr/local/lsws and both can be run from the bin subdirectory.
Please note that throughout this documentation, version numbers have been replaced with an x to ensure this documentation stays correct in the future, please replace these, as necessary, with the corresponding version numbers.
Following the steps above, LiteSpeed / OpenLiteSpeed Web Server should now be running with support for PHP as an SAPI extension. There are many more configuration options available for LSWS / OLS and PHP. For more information, check out the LiteSpeed wiki about » PHP.
Using LSPHP from the command line:
LSPHP(LSAPI + PHP) command line mode is used to process PHP scripts running on a remote server that does not necessarily have a web server running. It is used to process PHP scripts residing on a local web server (separate). This setup is suitable for service scalability as PHP processing is offloaded to a remote server.
Start lsphp from the command line on a 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
Have LSPHP bind to port 3000 on all IPv4 and IPv6 addresses:
/path/to/lsphp -b [::]:3000
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
Currently LiteSpeed PHP can be used with LiteSpeed Web Server, OpenLiteSpeed Web Server, and Apache mod_lsapi. For steps on server-side configuration, visit the wiki pages for » LiteSpeed Web Server and » OpenLiteSpeed.
LSPHP can be installed in several other ways as well.
CentOS: On CentOS, LSPHP can be installed from the LiteSpeed Repository or the Remi Repository using » RPM.
Debian: On Debian, LSPHP can be installed from the LiteSpeed Repository using » apt.
cPanel: Visit the respective » wiki page about how to install LSPHP with cPanel and LSWS/OLS using EasyApache 4.
Plesk: Plesk can be used with LSPHP on CentOS, CloudLinux, Debian, and Ubuntu, for more details on this, visit the respective » wiki page
「LiteSpeed Web Server/OpenLiteSpeed Web Server on Unix systems」をGoogle検索