Skip to content

Commit a968028

Browse files
authored
Merge pull request #213 from dvershinin/master
Remove mention of nginx-mod-lsapi package
2 parents 608e381 + 8a80fb0 commit a968028

File tree

1 file changed

+37
-47
lines changed
  • docs/cloudlinuxos/cloudlinux_os_components

1 file changed

+37
-47
lines changed

docs/cloudlinuxos/cloudlinux_os_components/README.md

Lines changed: 37 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -7740,13 +7740,13 @@ This mode is enabled by default and creates a separate lsphp process for each vi
77407740
77417741
### General information and requirements
77427742
7743-
The nginx-lsapi-module is an extension for the [NGINX](https://www.nginx.com/) web server, designed to seamlessly integrate the lightweight, high-performance [LiteSpeed](https://www.litespeedtech.com/open-source/litespeed-sapi) PHP processing capability directly within the NGINX architecture. This module enables NGINX to efficiently handle PHP requests using the LiteSpeed SAPI, offering an alternative to traditional PHP-FPM or mod_php approaches. It aims to leverage the speed and flexibility of LiteSpeed's PHP processing in environments where the NGINX is the preferred web server.
7743+
The NGINX LSAPI Module is an extension for the [NGINX](https://www.nginx.com/) web server, designed to seamlessly integrate the lightweight, high-performance [LiteSpeed](https://www.litespeedtech.com/open-source/litespeed-sapi) PHP processing capability directly within the NGINX architecture. This module enables NGINX to efficiently handle PHP requests using the LiteSpeed SAPI, offering an alternative to traditional PHP-FPM or mod_php approaches. It aims to leverage the speed and flexibility of LiteSpeed's PHP processing in environments where the NGINX is the preferred web server.
77447744
77457745
**How does it work?**
77467746
7747-
1. NGINX passes handling for PHP request to nginx-mod-lsapi;
7748-
2. nginx-mod-lsapi uses liblsapi to transfer request to the lsphp parent process;
7749-
3. lsphp forks the child process, which executes the request and returns data to nginx-mod-lsapi;
7747+
1. NGINX passes handling for PHP request to NGINX LSAPI Module;
7748+
2. NGINX LSAPI Module uses liblsapi to transfer request to the lsphp parent process;
7749+
3. lsphp forks the child process, which executes the request and returns data to NGINX LSAPI Module;
77507750
77517751
* If there are no requests for lsapi_pgrp_max_idle seconds, lsphp parent process will be terminated;
77527752
* If there are no lsphp child processes available when a new request comes, the new lsphp child process will be created;
@@ -7755,9 +7755,13 @@ The nginx-lsapi-module is an extension for the [NGINX](https://www.nginx.com/) w
77557755
77567756
**What is lsphp?**
77577757
7758-
lsphp - PHP + LSAPI. What is PHP LSAPI? [LiteSpeed Server Application Programming Interface](https://www.litespeedtech.com/open-source/litespeed-sapi/php) (LSAPI) is designed specifically for seamless, optimized communication between the LiteSpeed Web Server and third-party web applications. With nginx-mod-lsapi, this protocol is now available for NGINX.
7758+
lsphp - PHP + LSAPI. What is PHP LSAPI? [LiteSpeed Server Application Programming Interface](https://www.litespeedtech.com/open-source/litespeed-sapi/php)
7759+
(LSAPI) is designed specifically for seamless, optimized communication between the LiteSpeed Web Server and third-party web applications.
7760+
With NGINX LSAPI Module, this protocol is now available for NGINX.
77597761
7760-
Using nginx-mod-lsapi, we have seen the higher performance than NGINX with fastcgi+php-fpm, easier installation than php-fpm and easier integration with any control panel. nginx-mod-lsapi means faster and more stable dynamic web pages.
7762+
Using NGINX LSAPI Module, we have seen higher performance than NGINX with fastcgi+php-fpm,
7763+
easier installation than php-fpm and easier integration with any control panel.
7764+
NGINX LSAPI Module means faster and more stable dynamic web pages.
77617765
77627766
**Optional requirements**
77637767
@@ -7768,24 +7772,24 @@ Using nginx-mod-lsapi, we have seen the higher performance than NGINX with fastc
77687772
77697773
### Installation
77707774
7771-
nginx-mod-lsapi can be installed through YUM package manager, however, the installation process varies depending on the control panel.
7775+
NGINX LSAPI Module can be installed through YUM package manager. However, the installation process varies depending on the control panel.
77727776
77737777
Select the control panel you are using:
77747778
* [cPanel](./#installing-on-cpanel-servers-with-ea-nginx)
7775-
* [No control panel](./#installing-on-servers-with-no-control-panel-2)
7779+
* No control panel - In progress
77767780
* Plesk - In progress
77777781
* DirectAdmin - In progreess
77787782
77797783
#### Installing on cPanel servers with ea-nginx
77807784
7781-
Install nginx-mod-lsapi and related packages through YUM package manager as follows:
7785+
Install NGINX LSAPI Module and related packages through YUM package manager as follows:
77827786
<div class="notranslate">
77837787
77847788
```
77857789
yum install ea-nginx-mod-lsapi --enablerepo=cl-ea4-testing
77867790
```
77877791
</div>
7788-
Now, when the module is installed, restart NGINX to ensure that the nginx-mod-lsapi is enabled:
7792+
Now, when the module is installed, restart NGINX to ensure that NGINX LSAPI Module is enabled:
77897793
<div class="notranslate">
77907794
77917795
```
@@ -7796,37 +7800,20 @@ service nginx restart
77967800
Use Apache2Nginx to set up NGINX hosting on the server and automatically convert .htaccess files into corresponding NGINX configuration.
77977801
For more details, please visit [Apache2Nginx](/cloudlinuxos/apache2nginx/#apache2nginx).
77987802
7799-
#### Installing on servers with no control panel
7800-
7801-
Install nginx-mod-lsapi and related packages through YUM package manager as follows:
7802-
<div class="notranslate">
7803-
7804-
```
7805-
yum install nginx-mod-lsapi
7806-
```
7807-
</div>
7808-
Now, when the module is installed, restart NGINX to ensure that nginx-mod-lsapi is enabled:
7809-
<div class="notranslate">
7810-
7811-
```
7812-
service nginx restart
7813-
```
7814-
</div>
7815-
78167803
78177804
### Uninstalling
78187805
78197806
7820-
The uninstallation process of the nginx-mod-lsapi module also varies depending on your control panel.
7807+
The uninstallation process of the NGINX LSAPI Module also varies depending on your control panel.
78217808
78227809
Select the control panel you are using:
7823-
* [cPanel](./#uninstall-procedure-for-cpanel-servers-with-ea-nginx)
7824-
* [No control panel](./#uninstall-procedure-for-servers-with-no-control-panel-2)
7810+
* [cPanel](./#uninstallation-procedure-for-cpanel-servers-with-ea-nginx)
7811+
* No control panel - In progress
78257812
* Plesk - In progress
78267813
* DirectAdmin - In progreess
78277814
78287815
7829-
#### Uninstallation procedure for cPanel servers with EA-NGINX
7816+
#### Uninstallation procedure for cPanel servers with ea-nginx
78307817
78317818
Remove packages with YUM package manager:
78327819
<div class="notranslate">
@@ -7851,7 +7838,7 @@ Remove packages with YUM package manager:
78517838
<div class="notranslate">
78527839
78537840
```
7854-
yum erase nginx-mod-lsapi
7841+
yum erase ea-nginx-mod-lsapi
78557842
rm [path to nginx-mod-lsapi.conf]
78567843
```
78577844
</div>
@@ -7867,7 +7854,11 @@ service nginx restart
78677854
78687855
* [Configuration references](./#configuration-references-1)
78697856
7870-
In order to get nginx-mod-lsapi to work properly, you'll need to configure NGINX. To do this, we use a separate _lsapi.conf_ file.
7857+
:::tip Note
7858+
If using Apache2Nginx, no configuration is required for NGINX LSAPI Module. The module is automatically configured to process PHP requests.
7859+
:::
7860+
7861+
In order to get NGINX LSAPI Module to work properly, you'll need to configure NGINX. To do this, we use a separate _lsapi.conf_ file.
78717862
78727863
First of all, you need to make sure that the appropriate LSAPI module configuration exists and contains the correct content.
78737864
<div class="notranslate">
@@ -7899,15 +7890,15 @@ lsapi_enabled on;
78997890
The lsapi_enabled parameter is supported in global, server, and local configurations. Therefore, it can be enabled/disabled globally, only for the server, and also only for a specific location.
79007891
79017892
7902-
The LSPHP handler can be enabled using the lsapi_handler directive. The lsapi_handler directive tells NGINX that the files with .php extension should be handled by nginx-mod-lsapi with the selected handler.
7893+
The LSPHP handler can be enabled using the lsapi_handler directive. The lsapi_handler directive tells NGINX that the files with .php extension should be handled by NGINX LSAPI Module with the selected handler.
79037894
<div class="notranslate">
79047895
79057896
```
79067897
lsapi_handler application/x-httpd-lsphp;
79077898
```
79087899
</div>
79097900
7910-
If no handler is explicitly set for a request, the specified content type will be used as the handler name, therefore, please disable php.conf or any other PHP handler for using nginx-mod-lsapi. In this example application/x-httpd-lsphp is a default handler by which nginx-mod-lsapi processes requests with the lsphp binary from _/usr/local/bin/_ directory.
7901+
If no handler is explicitly set for a request, the specified content type will be used as the handler name, therefore, please disable php.conf or any other PHP handler for using NGINX LSAPI Module. In this example application/x-httpd-lsphp is a default handler by which NGINX LSAPI Module processes requests with the lsphp binary from _/usr/local/bin/_ directory.
79117902
79127903
The final lsapi.conf configuration might look like this:
79137904
<div class="notranslate">
@@ -7932,15 +7923,15 @@ server {
79327923
```
79337924
</div>
79347925
7935-
In order for nginx-mod-lsapi to work lsapi.conf should be loaded to NGINX through [Include](https://nginx.org/en/docs/ngx_core_module.html#include) directive.
7926+
In order for NGINX LSAPI Module to work lsapi.conf should be loaded to NGINX through [Include](https://nginx.org/en/docs/ngx_core_module.html#include) directive.
79367927
79377928
For a more detailed description of the module directives please visit the [Configuration reference](./#configuration-references-2).
7938-
For the installation guide for nginx-mod-lsapi please visit [Installation](./#installation-3).
7929+
For the installation guide for NGINX LSAPI Module please visit [Installation](./#installation-3).
79397930
79407931
#### Configuration references
79417932
79427933
7943-
[nginx-mod-lsapi customization](./#nginx-mod-lsapi-customization):
7934+
[NGINX LSAPI Module customization](./#nginx-lsapi-module-customization):
79447935
* [lsapi_enabled](./#lsapi-enabled)
79457936
* [lsapi_sock_path](./#lsapi-sock-path)
79467937
* [lsapi_per_user](./#lsapi-per-user-1)
@@ -7996,7 +7987,7 @@ For the installation guide for nginx-mod-lsapi please visit [Installation](./#in
79967987
* [lsapi_paranoid](./#lsapi-paranoid-1)
79977988
* [lsapi_check_doc_root](./#lsapi-check-doc-root)
79987989
7999-
#### **nginx-mod-lsapi customization**
7990+
#### **NGINX LSAPI Module customization**
80007991
80017992
#### **lsapi_enabled**
80027993
@@ -8718,10 +8709,10 @@ Set user & group for requests.
87188709
87198710
### Troubleshooting
87208711
8721-
**Debugging nginx-mod-lsapi issues: error.log & sulsphp.log**
8712+
**Debugging NGINX LSAPI Module issues: error.log & sulsphp.log**
87228713
87238714
8724-
nginx-mod-lsapi errors will be located in error_log and sulsphp_log.
8715+
NGINX LSAPI Module errors will be located in error_log and sulsphp_log.
87258716
Note that errors can appear in both logs at the same time, and you might need to refer to both of them to solve the issue.
87268717
87278718
See the following table for more details:
@@ -8747,7 +8738,7 @@ See the following table for more details:
87478738
87488739
CRIU is <span class="notranslate"> _Checkpoint/Restore In Userspace_ </span> , (pronounced <span class="notranslate"> kree-oo </span> ), is a software tool for the Linux operating system. Using this tool, you can freeze a running application (or part of it) and checkpoint it as a collection of files on disk. You can then use the files to restore the application and run it exactly as it was at the time of freeze (more information on the link [https://criu.org/Main_Page](https://criu.org/Main_Page) ).
87498740
8750-
nginx-mod-lsapi now supports the following parameters:
8741+
NGINX LSAPI Module now supports the following parameters:
87518742
87528743
| | | | |
87538744
|-|--|--|-|
@@ -8771,7 +8762,7 @@ lsapi_criu_debug off;
87718762
```
87728763
</div>
87738764
8774-
When NGINX module nginx-mod-lsapi detects CRIU enabled (lsapi_criu On), it prepares a directory for images (on the first request of virtualhost) to store ( <span class="notranslate"> lsapi_criu_img_path /var/ngx_lsapi/criu/[dir_name] </span> ), and starts the lsphp process. Lsphp increases a counter ( <span class="notranslate"> lsapi_criu_use_shm off|Signals </span> ) via shared memory or signals, and when counter reaches the limit ( <span class="notranslate"> lsapi_backend_initial_start 15 </span> ), lsphp sends the freezing request to CRIU.
8765+
When NGINX module NGINX LSAPI Module detects CRIU enabled (lsapi_criu On), it prepares a directory for images (on the first request of virtualhost) to store ( <span class="notranslate"> lsapi_criu_img_path /var/ngx_lsapi/criu/[dir_name] </span> ), and starts the lsphp process. Lsphp increases a counter ( <span class="notranslate"> lsapi_criu_use_shm off|Signals </span> ) via shared memory or signals, and when counter reaches the limit ( <span class="notranslate"> lsapi_backend_initial_start 15 </span> ), lsphp sends the freezing request to CRIU.
87758766
The CRIU service makes images of requested processes. Lsphp will not be frozen if counter does not reach the limit. The next time when lsphp will be stopped, it will be unfrozen from the images.
87768767
87778768
The images of the processes will be saved even if NGINX is restarted. However, all images will be deleted after a server restart by default. This can be modified by setting the new path <span class="notranslate"> lsapi_criu_imgs_path </span> .
@@ -8837,7 +8828,7 @@ systemctl daemon-reload
88378828
88388829
#### CRIU Installation
88398830
8840-
CRIU is installed as a dependency to the nginx-mod-lsapi package. To activate it:
8831+
CRIU is installed as a dependency to the NGINX LSAPI Module package. To activate it:
88418832
88428833
1. Enable service and start it:
88438834
@@ -8890,7 +8881,7 @@ Note that this option works only if <span class="notranslate">lsapi_terminate_ba
88908881
88918882
3. Global reset flag for cleaning all earlier saved images by CRIU.
88928883
8893-
Current nginx-mod-lsapi allows cleaning all images only with one flag file.
8884+
The current NGINX LSAPI Module allows cleaning all images only with one flag file.
88948885
88958886
Create <span class="notranslate"> /usr/share/criu/mod_lsapi/lsphp.criu.reset </span> file. Also don't forget to set permissions as follows: <span class="notranslate"> [nobody:nobody] </span> (or <span class="notranslate"> [nginx:nginx] </span> for non cPanel) and access mode [700] to the <span class="notranslate"> /usr/share/criu/mod_lsapi </span> directory.
88968887
@@ -8927,7 +8918,7 @@ This mode is enabled by default and creates a separate lsphp process for each vi
89278918
89288919
<span class="notranslate">`mod_lsapi_reset_me[server_name]`</span> flag will not work for a user when lsapi_per_user option is <span class="notranslate">`on`</span>.
89298920
8930-
5. There is an (default <span class="notranslate">`off`</span>) option in nginx-mod-lsapi that creates only one lsphp process for a user, regardless of the number of his virtual hosts. We don't recommend to use this option with CRIU, but if you use it, make sure that your virtual hosts (under the same user) have the same environment configurations. If they are not the same, this may cause undesirable lsphp process operations.
8921+
5. There is an (default <span class="notranslate">`off`</span>) option in NGINX LSAPI Module that creates only one lsphp process for a user, regardless of the number of his virtual hosts. We don't recommend to use this option with CRIU, but if you use it, make sure that your virtual hosts (under the same user) have the same environment configurations. If they are not the same, this may cause undesirable lsphp process operations.
89318922
89328923
89338924
@@ -10255,4 +10246,3 @@ This module is integrated into Apache for DirectAdmin control panel by default.
1025510246
This module is integrated into httpd Apache rpm provided by Cloudlinux OS by default.
1025610247
1025710248
If you are using an alternative Apache - [httpd24](https://www.cloudlinux.com/cloudlinux-os-blog/entry/httpd24-updated-for-cloudlinux-6), nothing has to be done as this module is also integrated into httpd24-httpd Apache rpm provided by Cloudlinux by default.
10258-

0 commit comments

Comments
 (0)