Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions install/unix/commandline.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
<!-- $Revision$ -->
<sect1 xml:id="install.unix.commandline" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>CGI and command line setups</title>
<para>
<simpara>
By default, PHP is built as both a <acronym>CLI</acronym> and
<acronym>CGI</acronym> program, which can be used for CGI
processing. If you are running a web server that PHP has module
support for, you should generally go for that solution for
performance reasons. However, the CGI version enables users to run
different PHP-enabled pages under different user-ids.
</para>
</simpara>
&warn.install.cgi;

<sect2 xml:id="install.unix.commandline.testing">
Expand Down
28 changes: 14 additions & 14 deletions install/unix/lighttpd-14.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,29 +3,29 @@
<sect1 xml:id="install.unix.lighttpd-14" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>Lighttpd 1.4 on Unix systems</title>

<para>
<simpara>
This section contains notes and hints specific to Lighttpd 1.4 installs
of PHP on Unix systems.
</para>
</simpara>

<para>
<simpara>
Please use the <link xlink:href="&url.lighttpd.doc;">Lighttpd trac</link>
to learn how to install Lighttpd properly before continuing.
</para>
</simpara>

<para>
<simpara>
FastCGI is the preferred SAPI to connect PHP and Lighttpd. FastCGI is
automagically enabled in php-cgi.
</para>
</simpara>

<sect2 xml:id="install.unix.lighttpd-14.lighttpd-spawn">
<title>Letting Lighttpd spawn php processes</title>

<para>
<simpara>
To configure Lighttpd to connect to PHP and spawn FastCGI processes, edit
<filename>lighttpd.conf</filename>. Sockets are preferred to connect to FastCGI processes on
the local system.
</para>
</simpara>

<example>
<title>Partial lighttpd.conf</title>
Expand Down Expand Up @@ -68,22 +68,22 @@ fastcgi.server = ( ".php" =>
<sect2 xml:id="install.unix.lighttpd-14.spawn-fcgi">
<title>Spawning with spawn-fcgi</title>

<para>
<simpara>
Lighttpd provides a program called spawn-fcgi to make the process of
spawning FastCGI processes easier.
</para>
</simpara>
</sect2>

<sect2 xml:id="install.unix.lighttpd-14.spawn-php">
<title>Spawning php-cgi</title>

<para>
<simpara>
It is possible to spawn processes without spawn-fcgi, though a bit of
heavy-lifting is required. Setting the <envar>PHP_FCGI_CHILDREN</envar> environment var
controls how many children PHP will spawn to handle incoming requests.
Setting <envar>PHP_FCGI_MAX_REQUESTS</envar> will determine how long (in requests) each
child will live. Here's a simple bash script to help spawn php responders.
</para>
</simpara>

<example>
<title>Spawning FastCGI Responders</title>
Expand Down Expand Up @@ -119,10 +119,10 @@ echo $! > "$PHP_PID"
<sect2 xml:id="install.unix.lighttpd-14.remote-fcgi">
<title>Connecting to remote FCGI instances</title>

<para>
<simpara>
FastCGI instances can be spawned on multiple remote machines in order to
scale applications.
</para>
</simpara>

<example>
<title>Connecting to remote php-fastcgi instances</title>
Expand Down
112 changes: 56 additions & 56 deletions install/unix/litespeed.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,51 +3,51 @@
<sect1 xml:id="install.unix.litespeed" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>LiteSpeed Web Server/OpenLiteSpeed Web Server on Unix systems</title>

<para>
<simpara>
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.
</para>
</simpara>

<para>
<simpara>
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.
</para>
</simpara>

<para>
<simpara>
This documentation will cover installing and configuring PHP with LSAPI
for a LiteSpeed Web Server and OpenLiteSpeed Web Server.
</para>
</simpara>

<para>
<simpara>
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.
</para>
</simpara>

<para>
<simpara>
Please note that throughout this documentation, version numbers have been
replaced with an <literal>x</literal> to ensure this documentation stays correct in the future,
please replace these, as necessary, with the corresponding version numbers.
</para>
</simpara>

<orderedlist>
<listitem>
<para>
<simpara>
To obtain and install either LiteSpeed Web Server or OpenLiteSpeed Web Server, visit the
LiteSpeed Web Server documentation
<link xlink:href="&url.litespeed.lsws;">install page</link>
or OpenLiteSpeed documentation
<link xlink:href="&url.litespeed.install;">install page</link>.
</para>
</simpara>
</listitem>

<listitem>
<para>
<simpara>
Obtain and unpack the php source:
</para>
</simpara>

<informalexample xml:id="install.unix.litespeed.extract.php">
<screen>
Expand All @@ -63,12 +63,12 @@ cd php-x.x.x
</listitem>

<listitem>
<para>
<simpara>
Configure and build PHP. This is where PHP can be customized with various options,
such as which extensions will be enabled. Run ./configure --help for a list of available
options. In the example, we'll use the default recommended configuration options for
LiteSpeed Web Server:
</para>
</simpara>

<informalexample xml:id="install.unix.litespeed.build.php">
<screen>
Expand All @@ -82,14 +82,14 @@ sudo make install
</listitem>

<listitem>
<para>
<simpara>
Checking The LSPHP Installation
</para>
</simpara>

<para>
<simpara>
One of the simplest ways to check whether the installation of PHP was successful
is to run the following code:
</para>
</simpara>

<informalexample>
<screen>
Expand All @@ -100,9 +100,9 @@ cd /usr/local/lsws/fcgi-bin/
</screen>
</informalexample>

<para>
<simpara>
This should return information about the new PHP build:
</para>
</simpara>

<informalexample>
<screen>
Expand All @@ -114,45 +114,45 @@ Zend Engine v2.6.0, Copyright (c) 1998-2015 Zend Technologies
</screen>
</informalexample>

<para>
<simpara>
Notice the <literal>litespeed</literal> in parenthesis. This means that the PHP binary has been
built with LSAPI support.
</para>
</simpara>
</listitem>
</orderedlist>

<para>
<simpara>
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 documentation about
<link xlink:href="&url.litespeed.php;">PHP</link>.
</para>
</simpara>

<para>
<simpara>
Using LSPHP from the command line:
</para>
</simpara>

<para>
<simpara>
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.
</para>
</simpara>

<para>
<simpara>
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
</para>
</simpara>

<para>
<simpara>
Examples:
</para>
</simpara>

<para>
<simpara>
Have LSPHP bind to port 3000 on all IPv4 and IPv6 addresses:
</para>
</simpara>

<informalexample>
<screen>
Expand All @@ -162,9 +162,9 @@ Zend Engine v2.6.0, Copyright (c) 1998-2015 Zend Technologies
</screen>
</informalexample>

<para>
<simpara>
Have LSPHP bind to port 3000 on all IPv4 addresses:
</para>
</simpara>

<informalexample>
<screen>
Expand All @@ -174,9 +174,9 @@ Zend Engine v2.6.0, Copyright (c) 1998-2015 Zend Technologies
</screen>
</informalexample>

<para>
<simpara>
Have LSPHP bind to address 192.168.0.2:3000:
</para>
</simpara>

<informalexample>
<screen>
Expand All @@ -186,9 +186,9 @@ Zend Engine v2.6.0, Copyright (c) 1998-2015 Zend Technologies
</screen>
</informalexample>

<para>
<simpara>
Have LSPHP accept requests on Unix domain socket <literal>/tmp/lsphp_manual.sock</literal>:
</para>
</simpara>

<informalexample>
<screen>
Expand All @@ -198,9 +198,9 @@ Zend Engine v2.6.0, Copyright (c) 1998-2015 Zend Technologies
</screen>
</informalexample>

<para>
<simpara>
Environment variables can be added before the LSPHP executable:
</para>
</simpara>

<informalexample>
<screen>
Expand All @@ -210,41 +210,41 @@ PHP_LSAPI_MAX_REQUESTS=500 PHP_LSAPI_CHILDREN=35 /path/to/lsphp -b IP_address:po
</screen>
</informalexample>

<para>
<simpara>
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 documentation pages for
<link xlink:href="&url.litespeed.web.server;">LiteSpeed Web Server</link>
and <link xlink:href="&url.litespeed.open;">OpenLiteSpeed</link>.
</para>
</simpara>

<para>
<simpara>
LSPHP can be installed in several other ways as well.
</para>
</simpara>

<para>
<simpara>
CentOS:
On CentOS, LSPHP can be installed from the LiteSpeed Repository or the Remi
Repository using <link xlink:href="&url.litespeed.packages;">RPM</link>.
</para>
</simpara>

<para>
<simpara>
Debian:
On Debian, LSPHP can be installed from the LiteSpeed Repository using
<link xlink:href="&url.litespeed.packages;">apt</link>.
</para>
</simpara>

<para>
<simpara>
cPanel:
Visit the respective <link xlink:href="&url.litespeed.cpanel;">documentation page</link>
about how to install LSPHP with cPanel and LSWS/OLS using EasyApache 4.
</para>
</simpara>

<para>
<simpara>
Plesk:
Plesk can be used with LSPHP on CentOS, CloudLinux, Debian, and Ubuntu,
for more details on this, visit the respective <link xlink:href="&url.litespeed.plesk;">documentation page</link>
</para>
</simpara>
</sect1>

<!-- Keep this comment at the end of the file
Expand Down
Loading