```
@@ -1040,7 +1067,7 @@ In case if you will migrate to KVM later you will need only switch the boot sett
#### Virtuozzo 7 and OpenVZ 7
-To use CloudLinux Shared Pro in Virtuozzo container, please update the next packages to the specified versions (or higher):
+To use CloudLinux Shared Pro in Virtuozzo container, please update the next packages to the specified versions (or higher):
* alt-php-ssa-0.3-4
* alt-php-xray-0.5-8
@@ -1048,7 +1075,7 @@ To use CloudLinux Shared Pro in Virtuozzo container, please update the next pack
* accelerate-wp-1.0-11
* lvemanager-7.7.5-2
* alt-python27-cllib-3.2.32-1
-* pam_lve-0.4-3
+* pam_lve-0.4-3
* lve-wrappers-0.7.7-1
* lve-utils-6.4.3-1
* cagefs-7.5.1-1
@@ -1057,7 +1084,7 @@ To use CloudLinux Shared Pro in Virtuozzo container, please update the next pack
#### Available Functionality
-
+
* [Lsapi](/cloudlinuxos/cloudlinux_installation/#lsapi)
* [AccelerateWP](/cloudlinuxos/cloudlinux_installation/#acceleratewp)
* [Hardened PHP](/cloudlinuxos/control_panel_integration/#hardened-php)
@@ -1074,13 +1101,13 @@ To use CloudLinux Shared Pro in Virtuozzo container, please update the next pack
#### Requirements
* [Virtuozzo 7](https://wiki.openvz.org/Virtuozzo) as server system
-* Virtuozzo container with CloudLinux Shared Pro 8
+* Virtuozzo container with CloudLinux Shared Pro 8
* cloudlinux-updates-testing repo is enabled (+ `yum clean all`)
-#### How to install
+#### How to install
1. Prepare Virtuozzo container with ostemplate almalinux-8-x86_64
-2. Enter to the container
+2. Enter to the container
3. Install cPanel:
```
cd /home && curl -o latest -L https://securedownloads.cpanel.net/latest && sh latest
@@ -1110,7 +1137,7 @@ In the current version only statistics about the lsapi module is available.

-#### Lsapi
+#### Lsapi
To install Lsapi via CloudLinux Wizard, please turn off mod_ruid2 in EasyApache 4 -> Apache Modules.
@@ -1131,7 +1158,7 @@ Currently mod_suexec is not available in containers and will be released in futu
You can find the complete lsapi documentation [here](https://docs.cloudlinux.com/cloudlinuxos/cloudlinux_os_components/#apache-mod-lsapi-pro).
-#### AccelerateWP
+#### AccelerateWP
If you'd like to try Smart Advice and AccelerateWP you should participate in the Beta tester program. To become a beta tester, please send your request at our Beta program page with the signup form [here](https://www.cloudlinux.com/wp-performance/). Once you submit the request, we will send you a confirmation email with program details, terms of use, and installation instructions.
@@ -1155,7 +1182,7 @@ You can find CageFS documentation [here](/cloudlinuxos/cloudlinux_os_components/
```sh
yum update alt-python27-cllib pam_lve lve-wrappers lve-utils liblve tuned-profiles-cloudlinux lvemanager
```
-2. The following commands can be executed via SSH or via CloudLinux Wizard
+2. The following commands can be executed via SSH or via CloudLinux Wizard
**Via SSH:**
```sh
yum install cagefs
@@ -1187,7 +1214,7 @@ Useful links:
* [Bundled PHP extensions](/cloudlinuxos/cloudlinux_os_components/#bundled-php-extensions)
-#### Python Selector
+#### Python Selector
Python Selector for Virtuozzo is available starting from the following packages version:
@@ -1236,17 +1263,17 @@ CloudLinux OS 7 supports both `ea-ruby24-mod_passenger` and `ea-ruby27-mod_passe
The `ea-apache24-mod-alt-passenger` is deprecated in favor of `ea-ruby24-mod_passenger` and `ea-ruby27-mod_passenger`.
:::
-#### General Information
+#### General Information
-General information can be found [here](/cloudlinuxos/cloudlinux_os_components/#general-information-and-requirements-7).
+General information can be found [here](/cloudlinuxos/cloudlinux_os_components/#general-information-and-requirements-7).
-#### Requirements
+#### Requirements
Information about Requirements can be found [here](/cloudlinuxos/cloudlinux_os_components/#requirements-2).
-#### Limitations
+#### Limitations
-Information about limitations can be found [here](/cloudlinuxos/cloudlinux_os_components/#limitations).
+Information about limitations can be found [here](/cloudlinuxos/cloudlinux_os_components/#limitations).
If during Node.js Selector usage on cPanel servers you get "ENOMEM npm ERR! errno-12" error, try to increase Memory limit in cPanel WHM → Server Configuration → Tweak Settings → System → Max cPanel process memory, then restart cPanel service with the following command to apply changes:
@@ -1254,11 +1281,11 @@ If during Node.js Selector usage on cPanel servers you get "ENOMEM npm ERR! errn
systemctl restart cpanel.service
```
-#### Node.js Deployment
+#### Node.js Deployment
Information about Node.js deployment can be found [here](/cloudlinuxos/cloudlinux_os_components/#node-js-deployment).
-#### Remote Usage of Node.js Interpreters
+#### Remote Usage of Node.js Interpreters
Information about Remote usage of Node.js interpreters can be found [here](/cloudlinuxos/cloudlinux_os_components/#remote-usage-of-node-js-interpreters).
@@ -1389,7 +1416,7 @@ To do that:
1. Make sure grub and kernel packages are not excluded. Edit file
.
2. Backup lilo config file:
-
+
```
@@ -1400,12 +1427,12 @@ mv /etc/lilo.conf /etc/lilo.conf.bak
3. Convert to CloudLinux OS Legacy (Shared) using
[deploy2cl](/cloudlinuxos/cloudlinux_installation/#converting-existing-servers) utility.
4. Check
`grub.conf` – it should be configured automatically:
-
+
```
- cat /boot/grub/grub.conf
- ............
+ cat /boot/grub/grub.conf
+ ............
default=0
timeout=5
@@ -1420,7 +1447,7 @@ timeout=5
5. Install grub to master boot record:
-
+
```
@@ -1431,18 +1458,19 @@ timeout=5
6. Reboot and check that you are running CloudLinux OS .
`uname -r` should show something like:
`2.6.18-294.8.1.el5.lve0.7.33`.
-## Switch license
+## Switching to a different license type
-You can convert your existing CloudLinux OS installation to CloudLinux OS Legacy (Shared).
+You can convert your existing CloudLinux OS installation to a different license type, such as CloudLinux OS Legacy (Shared).
-1. Obtain new key from [CLN](https://cln.cloudlinux.com)
-2. Run `rhnreg_ks --force --activationkey=
`
+1. Obtain a new activation key from [CLN](https://cln.cloudlinux.com)
+2. Run `rhnreg_ks --force --activationkey=`
-You can pass `--migrate-silently` argument to skip confirmation.
+You can pass the `--migrate-silently` argument to skip the confirmation prompt.
## Uninstalling
-You can always uninstall CloudLinux OS. In this case, the system will be converted back to AlmaLinux or CentOS* (Depends on what system the conversion was done from).
+You can always uninstall CloudLinux OS.
+In this case, the system will be converted back to AlmaLinux or CentOS* (depending on the system the conversion was done from).
:::warning
CentOS Linux 8 reached End Of Life (EOL) on December 31st, 2021. You can still uninstall CloudLinux and return to CentOS 8, but we don't guarantee stable operation of the system and its repositories after this action.
@@ -1457,7 +1485,7 @@ The following actions will be taken:
In the end, the script will provide instructions on how to finish the conversion back to AlmaLinux or CentOS*. That will require removal of CloudLinux OS kernel (manual step), and installation of AlmaLinux or CentOS* kernel (if needed).
:::warning
-Do not forget to free up a CloudLinux OS Legacy (Shared) license by removing the server from the [Servers section of your CLN account](https://docs.cloudlinux.com/cln/dashboard/#servers). After that, if you don't intend to use the license anymore, you can [remove it](https://docs.cloudlinux.com/cln/dashboard/#cloudlinux-os-activation-keys) to avoid being billed for it.
+Do not forget to free up a CloudLinux OS Legacy (Shared) license by removing the server from the [Servers section of your CLN account](https://docs.cloudlinux.com/cln/dashboard/#servers). After that, if you don't intend to use the license anymore, you can [remove it](https://docs.cloudlinux.com/cln/dashboard/#cloudlinux-os-activation-keys) to avoid being billed for it.
:::
To uninstall CloudLinux OS, run:
diff --git a/docs/cloudlinuxos/cloudlinux_os_components/README.md b/docs/cloudlinuxos/cloudlinux_os_components/README.md
index 4779a317a..c553e7a58 100644
--- a/docs/cloudlinuxos/cloudlinux_os_components/README.md
+++ b/docs/cloudlinuxos/cloudlinux_os_components/README.md
@@ -230,7 +230,7 @@ If MySQL Server is not installed, then install it according to control panel doc
For non-panel system:
* CloudLinux OS 6
-
+
```
@@ -241,7 +241,7 @@ For non-panel system:
* CloudLinux OS 7
-
+
```
@@ -324,14 +324,14 @@ Username, password and DB name must be the same as in point 2 of Database Setup
```
-/usr/sbin/lve-create-db
+/usr/sbin/lve-create-db
```
For DB primary initialization (creating tables, indexes, etc). There is no need to create anything in the DB manually.
* When done, restart server by running:
-
+
```
@@ -354,7 +354,7 @@ CREATE USER 'lvestats2_read'@'localhost' IDENTIFIED BY 'lvestats2_read_passwd';
* granting read-only privilege to the user
-
+
```
@@ -460,7 +460,7 @@ Run all the commands below under
root.
* **Setup**
* In
`/var/lib/pgsql/data/pg_hba.conf` config file change user authentication mode. Add the following lines (place before all other authentication parameters):
-
+
```
@@ -470,7 +470,7 @@ Run all the commands below under root.
host dblvestat all ::1/128 password
```
-
+
These lines enable user authentication by the password for
IP4/IP6 connections. You can set other modes if needed.
* Apply config changes by running:
@@ -490,7 +490,7 @@ Run all the commands below under
root.
```
-sudo -u postgres psql postgres
+sudo -u postgres psql postgres
```
@@ -567,7 +567,7 @@ service lvestats stop
* In server config file
`/etc/sysconfig/lvestats2` edit options for connecting to DB:
-
+
```
@@ -587,7 +587,7 @@ collect_usernames=true
```
-/usr/sbin/lve-create-db
+/usr/sbin/lve-create-db
```
@@ -669,7 +669,7 @@ After that
`сonnect_string` will look as follo
```
-#### Customize LVE-stats2 notifications
+#### Customize LVE-stats2 notifications
[Jinja2](http://jinja.pocoo.org/) is used as a template engine for the notifications.
@@ -684,7 +684,7 @@ By default the templates for English are set:
`/usr/sh
* `user_notify.txt` for user.
-Starting from `lve-stats-4.1.2`, it allows server administrators to use their own lvestats notifier email notification templates.
+Starting from `lve-stats-4.1.2`, it allows server administrators to use their own lvestats notifier email notification templates.
To use the custom templates, place them and the `locales.json` file to the `/etc/cl.emails.d/LOCALE` directory. File names are the same as in general `/etc/cl.emails.d/LOCALE` file.
@@ -757,11 +757,11 @@ Customized subjects have the higher priority than the key `user_notify.txt`
-
+
```
Subject: Customized subject example
Dear {{TONAME}},
-
+
Your {{DOMAIN}} web hosting account exceeded one or more of its resources within the last {{PERIOD}}.
{% if epf %}Exceeded the maximum of {{lep}} concurrent website connections. Your website was not available {{epf}} times because of this problem.
{% endif %}{% if pmemf %}Exceeded the physical memory limit of {{lpmem}}KB. Your website was not available {{pmemf}} times because of this problem.
@@ -771,14 +771,14 @@ Your {{DOMAIN}} web hosting account exceeded one or more of its resources within
{% endif %}{% if iof %}You reached limit of {{lio}}KB/s disk io rate {{iof}} times. The disk io speed for your account was slowed as a result of this problem.
{% endif %}{% if iopsf %}You reached limit of {{liops}} I/O operations {{iopsf}} times. The disk io speed for your account was slowed as a result of this problem.
{% endif %}
-
+
To view full details about your web hosting account's resource usage, including the time of each incident listed above, please click the link below and log into your cpanel hosting control panel, then click the "Resource Usage" link under the "Logs and Statistics" section.
http://{{DOMAIN}}:2083
-
+
If your account is regularly exceeding it's available resources, please consider upgrading to a higher level hosting plan that includes more resources. If you have any questions or need help with anything, just reply to this email and let us know.
-
+
Sincerely,
-
+
Your Friendly Web Hosting Support Team
```
@@ -817,7 +817,7 @@ In the new version, in order for the lve-stats notifier to include these words i
}
```
-The file format should be JSON, and the file encoding should be UTF-8. If this file is found and successfully read, the words from it will be used in emails.
+The file format should be JSON, and the file encoding should be UTF-8. If this file is found and successfully read, the words from it will be used in emails.
In case of any file reading/parsing error, a corresponding message will be written in the lve-stats log, and the contents of the file will be completely ignored.
If a key in the JSON file content is missing, then lve-stats notifier uses the word contained in the body of the program (just like in previous lve-stats versions).
Also, this file allows you to override/localize the subject of the email.
@@ -1017,21 +1017,21 @@ That is why we realize 4 plugins: **collector, analyz
# Part 1. Collector
import os
-from lvestats.core.plugin import LveStatsPlugin
+from lvestats.core.plugin import LveStatsPlugin
# Key name
COLLECTOR_KEY = 'FSizeWatcher_fsize'
-COLLECTOR_KEY_FILENAME = 'FSizeWatcher_fname'
+COLLECTOR_KEY_FILENAME = 'FSizeWatcher_fname'
class FSize_watcher_collector (LveStatsPlugin):
# this plugin should be first in chain
order = 0
# File to monitoring
- file_to_monitoring = None
-
+ file_to_monitoring = None
+
def __init__(self):
- pass
-
+ pass
+
# Sets configuration to plugin
def set_config(self, config):
self.file_to_monitoring = config.get('file_to_monitoring', None)
@@ -1041,12 +1041,12 @@ class FSize_watcher_collector (LveStatsPlugin):
try:
# if monitoring file absent, do nothing
if self.file_to_monitoring is None or not os.path.exists(self.file_to_monitoring):
- return
-
+ return
+
# Get file size
stat_info = os.stat(self.file_to_monitoring)
- fsize = stat_info.st_size
-
+ fsize = stat_info.st_size
+
# Place file name and file size to server data dictionary
lve_data[COLLECTOR_KEY_FILENAME] = self.file_to_monitoring
lve_data[COLLECTOR_KEY] = fsize
@@ -1094,43 +1094,43 @@ Note that plugin can monitor one file only.
```
# FSize_watcher_analyzer.py
# Example plugin for monitoring file size.
-# Part 2. Analyzer
+# Part 2. Analyzer
-from lvestats.core.plugin import LveStatsPlugin
+from lvestats.core.plugin import LveStatsPlugin
# Key name from collector plugin
-COLLECTOR_KEY = 'FSizeWatcher_fsize'
+COLLECTOR_KEY = 'FSizeWatcher_fsize'
# Key name 1 for saver plugin
SAVER_KEY = 'FSizeWatcher_fsize_to_store'
# Key name 2 for saver plugin
-SAVER_DATA_PRESENCE = 'FSizeWatcher_fsize_present'
+SAVER_DATA_PRESENCE = 'FSizeWatcher_fsize_present'
class FSize_watcher_analyzer (LveStatsPlugin):
# this plugin should be second in chain
order = 1
# Last file size
file_last_size = 0
- # Plugin run period in secondsperiod = 60
-
+ # Plugin run period in secondsperiod = 60
+
def __init__(self):
- pass
-
+ pass
+
# work method
def execute(self, lve_data):
# Default setting for saver
lve_data[SAVER_DATA_PRESENCE] = 0
# Check presence data
if COLLECTOR_KEY not in lve_data:
- return
-
+ return
+
# Get file size from server data dictionary
- fsize = lve_data[COLLECTOR_KEY]
-
+ fsize = lve_data[COLLECTOR_KEY]
+
# Check, if file size changed, store it for saver plugin
if fsize == self.file_last_size:
- return
-
+ return
+
# Put new size for saver plugin
lve_data[SAVER_KEY] = fsize
self.file_last_size = fsize
@@ -1159,19 +1159,19 @@ Plugin starts every 60 seconds (1 minute), because we need data fixation to be p
```
# FSize_watcher_saver.py
# Example plugin for monitoring file size and last modification date-time.
-# Part 3. Data saver
+# Part 3. Data saver
import signal
import sys
import time
-from lvestats.core.plugin import LveStatsPlugin
+from lvestats.core.plugin import LveStatsPlugin
# Key name 1 for saver plugin
SAVER_KEY = 'FSizeWatcher_fsize_to_store'
# Key name 2 for saver plugin
SAVER_DATA_PRESENCE = 'FSizeWatcher_fsize_present'
# Monitoring file name
-COLLECTOR_KEY_FILENAME = 'FSizeWatcher_fname'
+COLLECTOR_KEY_FILENAME = 'FSizeWatcher_fname'
class FSize_watcher_saver (LveStatsPlugin):
# this plugin should be third in chain
@@ -1181,16 +1181,16 @@ class FSize_watcher_saver (LveStatsPlugin):
# Log filename
log_file_name = None
# First run flag
- is_first_run = True
-
+ is_first_run = True
+
def __init__(self):
- signal.signal(signal.SIGTERM, self.sigterm_handler)
-
+ signal.signal(signal.SIGTERM, self.sigterm_handler)
+
# Sets configuration to plugin
def set_config(self, config):
# Get log filename
- self.log_file_name = config.get('log_filename', None)
-
+ self.log_file_name = config.get('log_filename', None)
+
# work method
def execute(self, lve_data):
# do nothing, if log file not defined
@@ -1203,7 +1203,7 @@ class FSize_watcher_saver (LveStatsPlugin):
return
# Get file size from server data dictionary
fsize = lve_data[SAVER_KEY]
-
+
# Store data to log
f = open(self.log_file_name, 'a')
if self.is_first_run:
@@ -1213,8 +1213,8 @@ class FSize_watcher_saver (LveStatsPlugin):
f.close()
except:
# Ignore all errors
- pass
-
+ pass
+
# Terminate handler
def sigterm_handler(self, signum, frame):
if self.log_file_name:
@@ -1313,23 +1313,23 @@ Also we can notice that handler SIG_TERM was
```
# FSize_watcher_saver.py
# Example plugin for monitoring file size and last modification date-time.
-# Part 4. Notifier
+# Part 4. Notifier
import time
-import smtplib
+import smtplib
from lvestats.lib.commons import dateutil
-from lvestats.core.plugin import LveStatsPlugin
+from lvestats.core.plugin import LveStatsPlugin
# Key name
COLLECTOR_KEY_FSIZE = 'FSizeWatcher_fsize'
-COLLECTOR_KEY_FILENAME = 'FSizeWatcher_fname'
+COLLECTOR_KEY_FILENAME = 'FSizeWatcher_fname'
# email message pattern
EMAIL_MESSAGE_PATTERN = """Hello, administrator!
Size of the file '%s' is %d bytes.
-"""
+"""
class FSize_watcher_notifier (LveStatsPlugin):
@@ -1364,8 +1364,8 @@ class FSize_watcher_notifier (LveStatsPlugin):
f.write(' - From: %s\n' % self.email_from)
f.write(' - To: %s\n' % self.email_to)
f.write(' - Subject: \'%s\'\n' % self.email_subject)
- f.close()
-
+ f.close()
+
# work method
def execute(self, lve_data):
if COLLECTOR_KEY_FSIZE not in lve_data or COLLECTOR_KEY_FILENAME not in lve_data:
@@ -1381,12 +1381,12 @@ class FSize_watcher_notifier (LveStatsPlugin):
msg = MIMEText(EMAIL_MESSAGE_PATTERN % (lve_data[COLLECTOR_KEY_FILENAME], lve_data[COLLECTOR_KEY_FSIZE]))
msg['Subject'] = self.email_subject
msg['From'] = self.email_from
- msg['To'] = self.email_to
-
+ msg['To'] = self.email_to
+
s = smtplib.SMTP('localhost')
s.sendmail(self.email_from, [self.email_to], msg.as_string())
- s.quit()
-
+ s.quit()
+
f = open(self.log_file_name, 'a')
f.write('%s - FSize_watcher_notifier plugin: email message was successfully sent\n' % time.asctime(time.localtime()))
f.close()
@@ -1402,7 +1402,7 @@ Configuration file _/etc/sysconfig/lvestats.config/FS
```
# Config file for FSize_watcher_notifier.py plugin
-# Please define email options here
+# Please define email options here
NOTIFY_FROM_EMAIL=user@hostname
NOTIFY_FROM_SUBJECT=Message from FSize_watcher_notifier
@@ -1598,7 +1598,7 @@ If the `/var/cagefs` directory already exists, you can move it. Learn how to mov
[https://docs.cloudlinux.com./#moving-var-cagefs-directory](https://docs.cloudlinux.com./#moving-var-cagefs-directory)
::: danger IMPORTANT
-If you place the skeleton in the `/home` directory on cPanel servers, configure the following option in cPanel WHM: **WHM -> Server Configuration -> Basic cPanel/WHM Setup -> Basic Config -> Additional home directories** .
+If you place the skeleton in the `/home` directory on cPanel servers, configure the following option in cPanel WHM: **WHM -> Server Configuration -> Basic cPanel/WHM Setup -> Basic Config -> Additional home directories** .
Set the value to blank (not the default Home ). Without this change, cPanel will create new accounts in incorrect locations.
:::
@@ -1738,11 +1738,11 @@ You can also use [CageFS CLI](/cloudlinuxos/command-line_tools/#cagefs)
* [Split by username](./#split-by-username)
* [Splitted by user’s UID mounts](./#splitted-by-user-s-uid-mounts)
-
- * [Mounting user’s home directory inside CageFS](./#mounting-users-home-directory-inside-cagefs)
+
+ * [Mounting user’s home directory inside CageFS](./#mounting-users-home-directory-inside-cagefs)
* [How to hide directory inside mount point](./#how-to-hide-directory-inside-mount-point)
-
+
* [Example](./#example)
* [Base home directory](./#base-home-directory)
@@ -1804,7 +1804,7 @@ To update the template, you should run:
```
-The behavior of the commands (and the files copied into _/usr/share/cagefs-skeleton_ directory) depends on the configuration files in _/etc/cagefs/conf.d_
+The behavior of the commands (and the files copied into _/usr/share/cagefs-skeleton_ directory) depends on the configuration files in _/etc/cagefs/conf.d_
You can add additional files, users, groups and devices into CageFS template by adding .cfg file, and running:
@@ -1867,7 +1867,7 @@ ffmpeg RPM should be installed on the system already.
#### Excluding Files
-To exclude files and directories from CageFS, create a file with the
`.black.list` extension inside the
`/etc/cagefs/` directory.
+To exclude files and directories from CageFS, create a file with the
`.black.list` extension inside the
`/etc/cagefs/` directory.
List the files or directories to exclude, one per line.
Run the following command to apply the changes:
@@ -1887,7 +1887,7 @@ Do not edit the
`/etc/cagefs/black.list` file d
To exclude users from CageFS, create a file (any name would work) inside
`/etc/cagefs/exclude` folder, and list users that you would like to exclude from CageFS in that file (each user in separate line).
-Then execute the following command to apply changes:
+Then execute the following command to apply changes:
```
@@ -1961,7 +1961,7 @@ This command will kill all current processes and reset mount points.
_[CageFS 5.1 and higher]_
-* _Please, see [Split by username](./#split-by-username) feature, as it might be simpler to implement in some cases._
+* _Please, see [Split by username](./#split-by-username) feature, as it might be simpler to implement in some cases._
Starting with CageFS 5.1 you can specify additional directories to be mounted inside user's CageFS. This can be specified for each user.
To specify virtual mount points for a user, create a file:
@@ -2184,7 +2184,7 @@ mount_basedir=1
```
-Directory structure in
_/var/www/vhosts/sitename.com_ will be mounted in CageFS for appropriate users.
+Directory structure in
_/var/www/vhosts/sitename.com_ will be mounted in CageFS for appropriate users.
Each user will have access to whole directory structure in
_/var/www/vhosts/sitename.com_ (according to their permissions).
::: tip Note
@@ -2210,7 +2210,7 @@ tо _/etc/cagefs/cagefs.mp_ file and then execute:
```
-cagefsctl --remount-all
+cagefsctl --remount-all
```
@@ -2244,7 +2244,7 @@ cagefsctl --reconfigure-cagefs
```
-service postgresql restart
+service postgresql restart
```
@@ -2254,7 +2254,7 @@ And update line:
```
-flags=-umc
+flags=-umc
```
@@ -2362,14 +2362,14 @@ If the path to the program being executed does not match any path specified in t
* You cannot specify both white and black list (
`allow` and
`deny`).
It is possible to verify that a path specified as a parameter for an option does not refer outside of the user’s home directory. This check is performed for options specified in the
`restrict_path` list. All issues are reported in
`/var/log/secure` log file.
-
+
> NOTE: By default, option filters only compare the starting parts of arguments with entries specified by lists.
For instance, if option "-f" is forbidden, "-f /etc/list" will be forbidden, but "-vf /etc/list" will not.
Starting from cagefs v. #7.4.12-1, specifying a `"strict_options": true` switch inside a filter file entry enables an extended parsing mechanism where each short option from a cluster is parsed separately.
It is recommended to enable this option, unless it causes issues with the restricted command's functionality.
-
+
```
@@ -2469,8 +2469,8 @@ We use the
`/etc/passwd` file because it is tru
```
-cat /opt/scripts/superbinary
-............
+cat /opt/scripts/superbinary
+............
#!/usr/bin/env bash
if [[ -e /var/cagefs ]]; then
@@ -2595,8 +2595,8 @@ PROXYEXEC_GID
```
[root ~]# id test
uid=1226(test) gid=1227(test) groups=1227(test)
-[root ~]# su - test -c "/my/scripts/superbinary"
-I am running without CageFS
+[root ~]# su - test -c "/my/scripts/superbinary"
+I am running without CageFS
I am running as: root
Number or records in /etc/passwd: 49
PROXYEXEC_UID=1226
@@ -2648,7 +2648,7 @@ The default wrapper already contains a check that does not allow to run it by th
```
#!/bin/bash
##CageFS proxyexec wrapper - ver 15
-
+
if [[ $EUID -eq 0 ]]; then
echo 'Cannot be run as root'
exit 1
@@ -2662,9 +2662,9 @@ Add the new check below:
```
-if [[ $1 == "/etc/passwd" ]]; then
- echo "it is not allowed for user to view this file!"
- exit 1
+if [[ $1 == "/etc/passwd" ]]; then
+ echo "it is not allowed for user to view this file!"
+ exit 1
fi
```
@@ -2707,12 +2707,12 @@ PROXYEXEC_GID=1227
_[4.0-5 and later]_
-To create a custom file in /etc directory for end user, create a directory:
+To create a custom file in /etc directory for end user, create a directory:
_/etc/cagefs/custom.etc/[username]_
Put all custom files, and sub-directories into that direcotry.
-For example, if you want to create custom
_/etc/hosts_ file for USER1 , create a directory:
+For example, if you want to create custom
_/etc/hosts_ file for USER1 , create a directory:
_/etc/cagefs/custom.etc/USER1_
Inside that directory, create a
_hosts_ file, with the content for that user.
@@ -2755,8 +2755,8 @@ There are two ways:
```
-mkdir /home/cagefs-skeleton
-ln -s /home/cagefs-skeleton /usr/share/cagefs-skeleton
+mkdir /home/cagefs-skeleton
+ln -s /home/cagefs-skeleton /usr/share/cagefs-skeleton
cagefsctl --init
```
@@ -2769,7 +2769,7 @@ cagefsctl --init
To move
`/var/cagefs` to another location:
-
+
```
cagefsctl --disable-cagefs
cagefsctl --unmount-all
@@ -2911,7 +2911,7 @@ The following features are applied during the cleanup:
**Disable PHP sessions cleanup on cPanel and Plesk**
-Here is a possible workaround for PHP session expiration problem (session lives longer than it is possible in a control panel). To use your own custom PHP sessions cleanup scripts - you can turn off built-in sessions cleanup implementation in the following way:
+Here is a possible workaround for PHP session expiration problem (session lives longer than it is possible in a control panel). To use your own custom PHP sessions cleanup scripts - you can turn off built-in sessions cleanup implementation in the following way:
add
`clean_user_php_sessions=false` line to _/etc/sysconfig/cloudlinux_ .
@@ -2946,11 +2946,11 @@ In order to do so, please create a file
_/etc/contain
```
-cat /etc/container/exclude_mounts.conf
-............
+cat /etc/container/exclude_mounts.conf
+............
^/dir1/
-^/dir2$
+^/dir2$
```
```
lvectl start
@@ -2961,7 +2961,7 @@ After that, all new created
LVEs will be with
```
-lvectl destroy all
+lvectl destroy all
lvectl apply all
```
@@ -2990,7 +2990,7 @@ To enable `/dev/shm` isolation, do the following steps:
2. Create a configuration file with mount options for shared memory
-
+
```
@@ -2999,7 +2999,7 @@ To enable `/dev/shm` isolation, do the following steps:
3. Remount CageFS to apply changes
-
+
```
@@ -3087,14 +3087,14 @@ when the size of the `/dev/shm` is specified in percentage of user’s physical
Starting from CageFS v.7.2.0-1, you can prevent a process from work if it can't enter to CageFS. The option is disabled by default.
-To enable it, run the following commands:
+To enable it, run the following commands:
```
touch /etc/cagefs/fail.on.error
cagefsctl --remount-all (cagefsctl --remount
)
```
-To disable it, run the following commands:
+To disable it, run the following commands:
```
rm -f /etc/cagefs/fail.on.error
@@ -3145,7 +3145,7 @@ To update CageFS skeleton, click Update CageFS Skelet
##### CageFS inbuilt in Cloudlinux Manager
-To enable or disable CageFS for a proper user (users), in Cloudlinux Manager , go to the Users tab and use the Toggle next to the chosen user(s) from the list under the CageFS column.
+To enable or disable CageFS for a proper user (users), in Cloudlinux Manager , go to the Users tab and use the Toggle next to the chosen user(s) from the list under the CageFS column.

@@ -3157,7 +3157,7 @@ To update CageFS skeleton, go to Cloudlinux Manager >
CageFS is an option inbuilt in Cloudlinux Manager that allows initializing and updating CageFS template, as well as managing users and mode of operation for CageFS.
-To enable or disable CageFS for a proper user (users), in Cloudlinux Manager , go to the Users tab and use the Toggle next to the chosen user(s) from the list under the CageFS column.
+To enable or disable CageFS for a proper user (users), in Cloudlinux Manager , go to the Users tab and use the Toggle next to the chosen user(s) from the list under the CageFS column.

@@ -3189,7 +3189,7 @@ The "All" mode will be deprecated starting from September 1, 2021. You can read
MySQL Governor has two active modes of operations:
* **off** - In this mode MySQL Governor will not throttle customer's queries, instead it will let you monitor the MySQL usage.
-* **abusers** - In this mode, once user goes over the limits specified in the MySQL Governor, all customer's queries will execute inside that user's LVE.
+* **abusers** - In this mode, once user goes over the limits specified in the MySQL Governor, all customer's queries will execute inside that user's LVE.
More details of the governor operation modes are described in the [Modes of operation](./#modes-of-operation) section
@@ -3213,7 +3213,7 @@ The main purpose of MySQL Governor is to monitor how many common resources are u
Before any SQL request, MySQL Governor determines which user sent the request and if this user exceed limits, the MySQL Governor pushes the request to appropriate LVE container.
-This is how common server resources can be managed.
+This is how common server resources can be managed.
#### Why the СPU/IO charts are different for database and LVE usage?
@@ -3223,7 +3223,7 @@ SQL requests are not limited inside LVE, so there are not any calculations for I
**Blue chart (database)**:
-This is the user’s real IO Database usage which was calculated by MySQL Governor.
+This is the user’s real IO Database usage which was calculated by MySQL Governor.
**Green chart (LVE)**:
@@ -3325,7 +3325,7 @@ Please make sure to specify your current MariaDB MySQL Governor 1.2-62+]
* 106 - MariaDB v10.6 [requires MySQL Governor 1.2-76+]
* 1011 - MariaDB v10.11 [requires MySQL Governor 1.2-103+]
-* 1104 - MariaDB v11.4 [requires MySQL Governor 1.2-122+]
+* 1104 - MariaDB v11.4 [requires MySQL Governor 1.2-122+]
:::tip Updated note
MariaDB version 10.4 is available for CloudLinux OS 6.
@@ -3358,12 +3358,12 @@ If you are installing MySQL Governor on a ser
| | |
|-|-|
-|mysql51 |MySQL v5.1 |
-|mysql55 |MySQL v5.5 |
-|mysql56 |MySQL v5.6 |
-|mysql57 |MySQL v5.7 |
-|mysql80 |MySQL v8.0 (requires MySQL Governor 1.2-37+)|
-|mysql84 |MySQL v8.4 (requires MySQL Governor 1.2-129+)|
+|mysql51 |MySQL v5.1 |
+|mysql55 |MySQL v5.5 |
+|mysql56 |MySQL v5.6 |
+|mysql57 |MySQL v5.7 |
+|mysql80 |MySQL v8.0 (requires MySQL Governor 1.2-37+)|
+|mysql84 |MySQL v8.4 (requires MySQL Governor 1.2-129+)|
|mariadb55 |MariaDB v5.5 |
|mariadb100 |MariaDB v10.0 |
|mariadb101 |MariaDB v10.1 |
@@ -3372,7 +3372,7 @@ If you are installing MySQL Governor on a ser
|mariadb104 |MariaDB v 10.4 [requires MySQL Governor 1.2-53+]|
|mariadb105 |MariaDB v 10.5 [requires MySQL Governor 1.2-62+]|
|mariadb106 |MariaDB v 10.6 [requires MySQL Governor 1.2-76+]|
-|mariadb1011 |MariaDB v 10.11 [requires MySQL Governor 1.2-103+]|
+|mariadb1011 |MariaDB v 10.11 [requires MySQL Governor 1.2-103+]|
|mariadb1104 |MariaDB v 11.4 [requires MySQL Governor 1.2-122+]|
|percona56 | Percona Server v 5.6 |
@@ -3465,7 +3465,7 @@ The script will install original MySQL server, and remove MySQL Governor configuration is located in /etc/container/mysql-governor.xml
+ MySQL Governor configuration is located in /etc/container/mysql-governor.xml
It is best to modify it using [dbctl](/cloudlinuxos/command-line_tools/#dbctl) tool.
@@ -3481,7 +3481,7 @@ Example configuration:
```
-
+
@@ -3489,20 +3489,20 @@ Example configuration:
-
+
-
+
-
+
-
+
-
+
@@ -3517,13 +3517,13 @@ MEDIUM - restrict info, _all_tracked_values_
LONG - restrict info, _all_tracked_values_, load average and vmstat info
VERYLONG - restrict info, _all_tracked_values_, load average and vmstat info, slow query info -->
-
+
+user_max_connections="30"/>
@@ -3531,8 +3531,8 @@ user_max_connections="30"/>
-
-
+
+
@@ -3549,18 +3549,18 @@ user_max_connections="30"/>
-
+
-
+
-
+
-
+
```
@@ -3622,7 +3622,7 @@ Here they are:
* absolute values of the LVE limits
-MySQL Governor allows setting the burstable limits for accounts. To provide that possibility, four levels of limits are defined: `current`, `short`, `middle`, and `long`. Correctly set limits can give users more CPU without having a bottleneck on MySQL.
+MySQL Governor allows setting the burstable limits for accounts. To provide that possibility, four levels of limits are defined: `current`, `short`, `middle`, and `long`. Correctly set limits can give users more CPU without having a bottleneck on MySQL.
**General principles of choosing the limits**:
@@ -3659,13 +3659,13 @@ service db_governor stop
```
-#### Mapping a user to a database
+#### Mapping a user to a database
**[** **MySQL Governor** **1.x]**
Traditionally MySQL Governor used prefixes to map user to database. With the latest version, we automatically generate user -> database user mapping for cPanel , Plesk and DirectAdmin control panels.
-
+
The mapping file is recreated daily by cron.
Mapping recreation is also triggered by the following events on cPanel servers:
@@ -3673,9 +3673,9 @@ Mapping recreation is also triggered by the following events on cPanel servers:
* creation of user
* modification of user
* removal of user
-
+
You can also rebuild the mapping file manually on cPanel, Plesk and DirectAdmin control panels by running the following command:
-
+
```
/usr/share/lve/dbgovernor/mysqlgovernor.py --dbupdate
```
@@ -3710,7 +3710,7 @@ pupkin3a_12 pupkin3a 506
This would specify that db users: pupkinas_u2, pupkinas_u1, pupkinas_u3 belong to user pupkinas with uid (lve id) 502
db user pupkin2a_uuu1 belongs to user pupkin2a with uid 505, etc...
-
+
`db_governor` service checks this file for modifications every 5 minutes.
If you need to force reload the mapping file, run:
@@ -3738,7 +3738,7 @@ Restrictions:
```
_timestamp_ _username_ LIMIT_ENFORCED _limit_setting_ __current_value_ _restrict_level__ SERVER_LOAD TRACKED_VALUES_DUMP
- ...
+ ...
```
@@ -3792,7 +3792,7 @@ To install beta version of MySQL:
|mysql56 | MySQL v5.6|
|mysql57 | MySQL v5.7|
|mysql80 | MySQL v8.0 (requires MySQL Governor 1.2-37+)|
-|mysql84 | MySQL v8.4 (requires MySQL Governor 1.2-129+)|
+|mysql84 | MySQL v8.4 (requires MySQL Governor 1.2-129+)|
|mariadb55 | MariaDB v5.5|
|mariadb100 | MariaDB v10.0|
|mariadb101 | MariaDB v10.1|
@@ -3801,7 +3801,7 @@ To install beta version of MySQL:
|mariadb104 | MariaDB v 10.4 [requires MySQL Governor 1.2-53+]||
|mariadb105 | MariaDB v 10.5 [requires MySQL Governor 1.2-62+]|
|mariadb106 | MariaDB v 10.6 [requires MySQL Governor 1.2-76+]|
-|mariadb1011 | MariaDB v 10.11 [requires MySQL Governor 1.2-103+]|
+|mariadb1011 | MariaDB v 10.11 [requires MySQL Governor 1.2-103+]|
|mariadb1104 | MariaDB v 11.4 [requires MySQL Governor 1.2-122+]|
|percona56 | Percona v 5.6|
@@ -3843,7 +3843,7 @@ To switch on the PrivateDevices mode, follow these steps.
```
PrivateDevices=true
DeviceAllow=/dev/lve
- BindPaths=/dev/lve
+ BindPaths=/dev/lve
```
* Invoke `systemctl daemon-reload`
* Restart _mysqld_ service
@@ -3864,9 +3864,9 @@ The following script could be used before installing MySQL-governor and MySQL/Ma
```
/usr/share/lve/dbgovernor/scripts/mysql_backup.sh
```
-
+
-:::tip
+:::tip
The script `mysql_backup.sh` is provided starting from the Governor version 1.2-115.
:::
@@ -3924,7 +3924,7 @@ The main purpose of MySQL Governor is to monitor how many common resources are u
Before any SQL request, MySQL Governor determines which user sent the request and if this user exceed limits, the MySQL Governor pushes the request to appropriate LVE container.
-This is how common server resources can be managed.
+This is how common server resources can be managed.
#### Why the СPU/IO charts are different for database and LVE usage?
@@ -3934,7 +3934,7 @@ SQL requests are not limited inside LVE, so there are not any calculations for I
**Blue chart (database)**:
-This is the user’s real IO Database usage which was calculated by MySQL Governor.
+This is the user’s real IO Database usage which was calculated by MySQL Governor.
**Green chart (LVE)**:
@@ -3999,7 +3999,7 @@ touch /etc/systemd/system/mariadb.service.d/limits.conf
```
-[Service]
+[Service]
LimitNOFILE=99999
```
@@ -4109,28 +4109,28 @@ After installing native PHP, please run the `cloudlinux-selector setup --interpr
### Supported versions
-::: tip
+::: tip
The mark `x` stands for a supported version.
:::
-| | Cloudlinux 6 | Cloudlinux 7 | Cloudlinux 8 | Cloudlinux 9 |
-|:-----------:|:------------:|:------------:|:------------:|:------------:|
-| alt-php 5.1 | x | x | x | – |
-| alt-php 5.2 | x | x | x | x |
-| alt-php 5.3 | x | x | x | x |
-| alt-php 5.4 | x | x | x | x |
-| alt-php 5.5 | x | x | x | x |
-| alt-php 5.6 | x | x | x | x |
-| alt-php 7.0 | x | x | x | x |
-| alt-php 7.1 | x | x | x | x |
-| alt-php 7.2 | x | x | x | x |
-| alt-php 7.3 | x | x | x | x |
-| alt-php 7.4 | x | x | x | x |
-| alt-php 8.0 | x | x | x | x |
-| alt-php 8.1 | x | x | x | x |
-| alt-php 8.2 | x | x | x | x |
-| alt-php 8.3 | x | x | x | x |
-| alt-php 8.4 | – | x | x | x |
+| | Cloudlinux 6 | Cloudlinux 7 | Cloudlinux 8 | Cloudlinux 9 | Cloudlinux 10 |
+|:-----------:|:-------------:|:-------------:|:-------------:|:-------------:|:-------------:|
+| alt-php 5.1 | x | x | x | – | – |
+| alt-php 5.2 | x | x | x | x | x |
+| alt-php 5.3 | x | x | x | x | x |
+| alt-php 5.4 | x | x | x | x | x |
+| alt-php 5.5 | x | x | x | x | x |
+| alt-php 5.6 | x | x | x | x | x |
+| alt-php 7.0 | x | x | x | x | x |
+| alt-php 7.1 | x | x | x | x | x |
+| alt-php 7.2 | x | x | x | x | x |
+| alt-php 7.3 | x | x | x | x | x |
+| alt-php 7.4 | x | x | x | x | x |
+| alt-php 8.0 | x | x | x | x | x |
+| alt-php 8.1 | x | x | x | x | x |
+| alt-php 8.2 | x | x | x | x | x |
+| alt-php 8.3 | x | x | x | x | x |
+| alt-php 8.4 | – | x | x | x | x |
### Installation and update
@@ -4148,7 +4148,7 @@ yum groupinstall alt-php
```
-Update CageFS &
LVE Manager with support for PHP Alternatives:
+Update CageFS &
LVE Manager with support for PHP Alternatives:
```
@@ -4239,7 +4239,7 @@ yum groupinstall alt-php
* via cPanel admin interface
-
+
Go to
cPanel → Admin interface → LVE Manager → Dashboard → click
_Refresh_

@@ -4339,7 +4339,7 @@ Go to the _External App_ tab, _External Application_ ➞ Add.

-* The _Command line_ should be `/var/www/cgi-bin/cgi_wrapper/cloudlinux_wrapper` on Plesk.
+* The _Command line_ should be `/var/www/cgi-bin/cgi_wrapper/cloudlinux_wrapper` on Plesk.
* For other control panels, the _Command line_ should be `/usr/local/bin/lsphp`.
* The _Run On Start Up_ line must contain `Yes` or `No`.
@@ -4541,7 +4541,7 @@ done
```
This command will reset the extensions for all users on PHP version 8.4 to the default list. You can specify a different PHP version by modifying the `--version` argument in the command above.
-
+
To reset the extensions for a specific user, you can use the following command:
```
selectorctl --reset-user-extensions --version=8.4 --user=user1
@@ -4555,7 +4555,7 @@ Note, that this is
'local' to CageFS, and dif
```
-# cagefsctl -e USERNAME
+# cagefsctl -e USERNAME
```
@@ -4621,8 +4621,8 @@ php.ini=/etc/php.ini
3. For each user that needs custom file, create directory
_/etc/cagefs/custom.etc/USER_NAME/php.ini_ .
-For example if you want to create custom for
USER1 and
USER2 you would create files:
-
_/etc/cagefs/custom.etc/USER1/php.ini_
+For example if you want to create custom for
USER1 and
USER2 you would create files:
+
_/etc/cagefs/custom.etc/USER1/php.ini_
_/etc/cagefs/custom.etc/USER2/php.ini_
Create such files for each user that should have custom file.
@@ -4632,7 +4632,7 @@ Create such files for each user that should have custom file.
```
-cagefsctl --force-update
+cagefsctl --force-update
```
@@ -4655,7 +4655,7 @@ cagefsctl --update-etc
in order to apply changes to CageFS for all users.
-OR
+OR
@@ -4675,7 +4675,7 @@ It is enough to put `php.ini` in the directory where PHP script is located in or
:::
1. For each user that needs custom file, create directory
`/etc/cagefs/custom.etc/USER_NAME/php.ini`.
-
+
For example, if you want to create a custom file for USER1 and USER2 you would create files:
@@ -4698,7 +4698,7 @@ It is enough to put `php.ini` in the directory where PHP script is located in or
3. Configure `php.ini` load path for user’s domains.
-
+
* When using **suphp** handler, you should use `SuPHP_ConfigPath` directive in virtual host configuration for these domains, or use this directive in `.htaccess` files: `suPHP_ConfigPath/etc`.
* When using **mod_lsapi**, you should use `lsapi_phprc` directive in virtual host configuration: `lsapi_phprc/etc/`.
@@ -4725,7 +4725,7 @@ It is enough to put `php.ini` in the directory where PHP script is located in or
5. If you have modified anything in `/etc/cagefs/custom.etc` directory, you should execute one of the following:
* to apply changes to CageFS for all users, run:
-
+
```
@@ -4734,7 +4734,7 @@ It is enough to put `php.ini` in the directory where PHP script is located in or
* to apply changes to CageFS for specific users, run:
-
+
```
@@ -4826,7 +4826,7 @@ Once
FFmpeg is installed you can install PHP
```
-yum install alt-php*ffmpeg
+yum install alt-php*ffmpeg
```
@@ -4886,7 +4886,7 @@ To use `alt-php72-zts` with PHP Selector you need the following:
**Using zts PHP**
1. Install `alt-php72-zts` with the following command:
-
+
```
@@ -4939,9 +4939,9 @@ To use `alt-php72-zts` with PHP Selector you need the following:
**Using non-zts PHP**
1. Make sure that
`/etc/cl.selector/selector.conf` file contains correct paths to the `non-zts` PHP binaries.
-
+
You should remove the old lines:
-
+
```
@@ -4959,7 +4959,7 @@ And replace them with the lines with the new paths:
php-cli 7.2 7.2.20 /opt/alt/php72/usr/bin/php
```
-
+
2. Make sure that
`/opt/alt/php72/etc/php.d.all` path refers to the directory containing `ini` files for `non-zts` PHP extensions:
@@ -5119,8 +5119,8 @@ Add an absolute path to PHP binaries into
/etc/cl.sel
```
-php 5.1 5.1.2 /opt/alt/php51/usr/bin/php-cgi
-php-cli 5.1 5.1.2 /opt/alt/php51/usr/bin/php
+php 5.1 5.1.2 /opt/alt/php51/usr/bin/php-cgi
+php-cli 5.1 5.1.2 /opt/alt/php51/usr/bin/php
php-fpm 5.1 5.1.2 /opt/alt/php51/usr/sbin/php-fpm
^ ^ ^ ^----- absolute path
| | |---------------------- real version
@@ -5213,37 +5213,37 @@ selectorctl --setup-without-cagefs USER
When executing `--setup-without-cagefs`, the following actions are performed:
-* Creating symlinks to the user modules and options for each Alt-PHP version:
+* Creating symlinks to the user modules and options for each Alt-PHP version:
_/opt/alt/php55/link/conf/alt_php.ini -> /home/USER/.cl.selector/alt_php55.ini_
-* In user home directory creating:
+* In user home directory creating:
_.cl.selector/_
-“Backup” settings files (selected version, modules, options):
- _.cl.selector/defaults.cfg_
+“Backup” settings files (selected version, modules, options):
+ _.cl.selector/defaults.cfg_
_.cl.selector/alt_php44.cfg_
-Symlinks to the selected version:
- _.cl.selector/lsphp -> /opt/alt/php44/usr/bin/lsphp_
- _.cl.selector/php.ini -> /opt/alt/php44/etc/php.ini_
- _.cl.selector/php-cli -> /opt/alt/php44/usr/bin/php_
- _.cl.selector/php -> /opt/alt/php44/usr/bin/php-cgi_
+Symlinks to the selected version:
+ _.cl.selector/lsphp -> /opt/alt/php44/usr/bin/lsphp_
+ _.cl.selector/php.ini -> /opt/alt/php44/etc/php.ini_
+ _.cl.selector/php-cli -> /opt/alt/php44/usr/bin/php_
+ _.cl.selector/php -> /opt/alt/php44/usr/bin/php-cgi_
-Additional symlinks for environment variable $PATH (search path) in the file ~/.bashrc :
- _.cl.selector/selector.path/_
- _.cl.selector/selector.path/php-cgi -> ../php_
- _.cl.selector/selector.path/php -> ../php-cli_
+Additional symlinks for environment variable $PATH (search path) in the file ~/.bashrc :
+ _.cl.selector/selector.path/_
+ _.cl.selector/selector.path/php-cgi -> ../php_
+ _.cl.selector/selector.path/php -> ../php-cli_
Generated ini files with selected modules and options for each version:
- _.cl.selector/alt_php44.ini_
- _.cl.selector/alt_php51.ini_
- _.cl.selector/alt_php52.ini_
- _.cl.selector/alt_php53.ini_
- _.cl.selector/alt_php54.ini_
- _.cl.selector/alt_php55.ini_
- _.cl.selector/alt_php56.ini_
- _.cl.selector/alt_php70.ini_
- _.cl.selector/alt_php71.ini_
+ _.cl.selector/alt_php44.ini_
+ _.cl.selector/alt_php51.ini_
+ _.cl.selector/alt_php52.ini_
+ _.cl.selector/alt_php53.ini_
+ _.cl.selector/alt_php54.ini_
+ _.cl.selector/alt_php55.ini_
+ _.cl.selector/alt_php56.ini_
+ _.cl.selector/alt_php70.ini_
+ _.cl.selector/alt_php71.ini_
Symlinks above are being created according to the settings in ~/.cl.selector/defaults.cfg and ~/.cl.selector/alt_php44.cfg files (44 - corresponding PHP version), which are storing PHP Selector settings for the user. These files are usually taken from user home directory backup or when migrating account from another server. Thus, when migrating account from server to server, PHP Selector settings are saved.
@@ -5255,7 +5255,7 @@ is being added to the user file `~/.bashrc`
Apache PHP handlers settings are not changed.
-* Also `selectorctl --setup-without-cagefs` command does the following:
+* Also `selectorctl --setup-without-cagefs` command does the following:
* Turns off link traversal protection (linksafe);
* Turns off cagefs service.
@@ -5270,7 +5270,7 @@ selectorctl --revert-to-cagefs
(CageFS should be initialized by using `cagefsctl --init` command before running the command above)
-This command removes symlinks:
+This command removes symlinks:
`/opt/alt/php55/link/conf/alt_php.ini` -> `/home/USER/.cl.selector/alt_php55.ini`
turns on link traversal protection (linksafe) and cagefs service.
@@ -5286,12 +5286,12 @@ CageFS 6.0-33 or higher, LVE Manager 2.0-11.2 o
There is `/etc/cl.selector/global_php.ini` file, where you can specify values of PHP options that should be applied for all Alt-PHP versions that are installed on a server. These settings will also be automatically applied to the new Alt-PHP versions that will be installed later.
-Example:
- _# cat /etc/cl.selector/global_php.ini_
- _[Global PHP Settings]_
- _date.timezone = Europe/Warsaw_
- _error_log = error_log_
- _memory_limit = 192M_
+Example:
+ _# cat /etc/cl.selector/global_php.ini_
+ _[Global PHP Settings]_
+ _date.timezone = Europe/Warsaw_
+ _error_log = error_log_
+ _memory_limit = 192M_
Sections are ignored. Only name of an option and a value have meaning.
When an option is absent in _/etc/cl.selector/global_php.ini_ file, than it is not changed (applied) to php.ini for Alt-PHP versions.
@@ -5306,7 +5306,7 @@ The behavior above is changed for cPanel servers with EasyApache 4. The `/usr/local/lib/php.ini` file exists, `error_log` and `date.timezone` options will be taken from that `php.ini` file.
* When `/usr/local/lib/php.ini` file does not exist, `error_log` and `date.timezone` options will be taken from the `php.ini` file for system default PHP version selected in MultiPHP Manager.
-
+
This functionality works when the system default PHP version is `ea-php` only. When the system default PHP version is `alt-php`, `error_log` and `date.timezone` directives will be NOT taken from that `php.ini` file.
@@ -5430,8 +5430,8 @@ native(5.6) e d
```
-The first column: PHP version
-The second column: enabled or not ( e - enabled)
+The first column: PHP version
+The second column: enabled or not ( e - enabled)
The third column: if selected as default ( d - default)
**Set default version:**
@@ -5488,8 +5488,8 @@ Result:
```
-+: enabled
-~: included in php binary (cannot be disabled) or enabled in php global config file
_/opt/alt/phpXX/etc/php.ini_
++: enabled
+~: included in php binary (cannot be disabled) or enabled in php global config file
_/opt/alt/phpXX/etc/php.ini_
-: disabled
**Select default extensions (enable comma-separated list of extensions globally for a version):**
@@ -5607,7 +5607,7 @@ See also [PHP Selector CLI tools](/command-line_tools/#php-selector).
### Bundled PHP extensions
-You can find this information in the corresponding section of the TuxCare documentation:
+You can find this information in the corresponding section of the TuxCare documentation:
[List of extensions supported by the ALT&EA team for each version of PHP](https://docs.cloudlinux.com/cloudlinuxos/alt-ea_packages/#bundled-php-extensions)
@@ -5629,20 +5629,20 @@ OpenLiteSpeed is not compatible with Python Selector due to lack of `.htaccess`
### Supported versions
-| CloudLinux 6 | CloudLinux 7 | CloudLinux 8 | CloudLinux 9 |
-|---------------|---------------|---------------|---------------|
-| alt-python 2.7 | alt-python 2.7 | alt-python 2.7 | alt-python 2.7 |
-| alt-python 3.3 | alt-python 3.3 | alt-python 3.3 | alt-python 3.3 |
-| alt-python 3.4 | alt-python 3.4 | alt-python 3.4 | alt-python 3.4 |
-| alt-python 3.5 | alt-python 3.5 | alt-python 3.5 | alt-python 3.5 |
-| alt-python 3.6 | alt-python 3.6 | alt-python 3.6 | alt-python 3.6 |
-| alt-python 3.7 | alt-python 3.7 | alt-python 3.7 | alt-python 3.7 |
-| alt-python 3.8 | alt-python 3.8 | alt-python 3.8 | alt-python 3.8 |
-| alt-python 3.9 | alt-python 3.9 | alt-python 3.9 | alt-python 3.9 |
-| alt-python 3.11| alt-python 3.10| alt-python 3.10| alt-python 3.10|
-| | alt-python 3.11| alt-python 3.11| alt-python 3.11|
-| | alt-python 3.12| alt-python 3.12| alt-python 3.12|
-
+| CloudLinux 6 | CloudLinux 7 | CloudLinux 8 | CloudLinux 9 | CloudLinux 10 |
+|----------------|----------------|----------------|----------------|----------------|
+| alt-python 2.7 | alt-python 2.7 | alt-python 2.7 | alt-python 2.7 | alt-python 2.7 |
+| alt-python 3.3 | alt-python 3.3 | alt-python 3.3 | alt-python 3.3 | alt-python 3.6 |
+| alt-python 3.4 | alt-python 3.4 | alt-python 3.4 | alt-python 3.4 | alt-python 3.8 |
+| alt-python 3.5 | alt-python 3.5 | alt-python 3.5 | alt-python 3.5 | alt-python 3.9 |
+| alt-python 3.6 | alt-python 3.6 | alt-python 3.6 | alt-python 3.6 | alt-python 3.11|
+| alt-python 3.7 | alt-python 3.7 | alt-python 3.7 | alt-python 3.7 | alt-python 3.12|
+| alt-python 3.8 | alt-python 3.8 | alt-python 3.8 | alt-python 3.8 | alt-python 3.13|
+| alt-python 3.9 | alt-python 3.9 | alt-python 3.9 | alt-python 3.9 | |
+| alt-python 3.11| alt-python 3.10| alt-python 3.10| alt-python 3.10| |
+| | alt-python 3.11| alt-python 3.11| alt-python 3.11| |
+| | alt-python 3.12| alt-python 3.12| alt-python 3.12| |
+
### Installation
You can install Python Selector using the [CloudLinux OS Installation Wizard](/cloudlinuxos/lve_manager/#cloudlinux-os-shared-installation-wizard).
@@ -5661,7 +5661,7 @@ Here you can find the installation steps for supported control panels:
To use Python Selector, it is required to install the following:
* alternative Python packages by running the following command:
-
+
```
@@ -5677,7 +5677,7 @@ yum groupinstall alt-python
yum install lvemanager lve-utils alt-python-virtualenv
```
-
+
Phusion Passenger could be installed by using **either** ```ea-ruby24-mod_passenger``` **or** ```ea-ruby27-mod_passenger```. ```ea-ruby27-mod_passenger``` is **not** compatible with systems running CloudLinux OS 6. CloudLinux OS 7 supports **both** ```ea-ruby24-mod_passenger``` and ```ea-ruby27-mod_passenger```. If your system runs CloudLinux OS 8, you can **only** use ```ea-ruby27-mod_passenger```.
Adding Python module requires executing permissions to
`gcc/make` binaries.
@@ -5693,7 +5693,7 @@ cagefsctl --force-update
* We recommend use CageFS for better security. See [CageFS documentation for details](./#cagefs).
#### DirectAdmin
-
+
To use Python Selector, it is required to install the following:
* alternative Python packages by running the following command:
@@ -5704,7 +5704,7 @@ To use Python Selector, it is required to install the following:
yum groupinstall alt-python
```
-
+
* CloudLinux Manager, LVE Utils and Phusion Passenger to create isolated Python environments by running the following command:
@@ -5744,7 +5744,7 @@ To use Ruby Selector install alternative
```
-yum groupinstall alt-ruby
+yum groupinstall alt-ruby
```
@@ -5785,7 +5785,7 @@ The same result can be accomplished in CLI by running:
cloudlinux-config set --json --data '{"options":{"uiSettings":{"hideRubyApp":false}}}'
```
-
+
:::tip Note
If you are using cPanel/WHM, you can also configure hide/show
CloudLinux OS Ruby Selectors in
WHM | Feature Manager.
For that, you’d need to first uncheck
`Hide Ruby App in web-interface` in the
LVE Manager. This will make the menu appear for all accounts. After that, you are free to disable this app in
WHM | Feature Manager for the required feature lists.
@@ -5847,21 +5847,21 @@ See also [Ruby Selector CLI tools](/cloudlinuxos/command-line_tools/#ruby-select
### Supported versions
-| CloudLinux 6 | CloudLinux 7 | CloudLinux 8 | CloudLinux 9 |
-| ---------------- | ---------------- | ---------------- | ---------------- |
-| alt‑nodejs 6.x | alt‑nodejs 6.x | alt‑nodejs 6.x | alt‑nodejs 6.x |
-| alt‑nodejs 8.x | alt‑nodejs 8.x | alt‑nodejs 8.x | alt‑nodejs 8.x |
-| alt‑nodejs 9.x | alt‑nodejs 9.x | alt‑nodejs 9.x | alt‑nodejs 9.x |
-| alt‑nodejs 10.x | alt‑nodejs 10.x | alt‑nodejs 10.x | alt‑nodejs 10.x |
-| alt‑nodejs 11.x | alt‑nodejs 11.x | alt‑nodejs 11.x | alt‑nodejs 11.x |
-| alt‑nodejs 12.x | alt‑nodejs 12.x | alt‑nodejs 12.x | alt‑nodejs 12.x |
-| alt‑nodejs 14.x | alt‑nodejs 14.x | alt‑nodejs 14.x | alt‑nodejs 14.x |
-| — | alt‑nodejs 16.x | alt‑nodejs 16.x | alt‑nodejs 16.x |
-| — | alt‑nodejs 18.x | alt‑nodejs 18.x | alt‑nodejs 18.x |
-| — | alt‑nodejs 19.x | alt‑nodejs 19.x | alt‑nodejs 19.x |
-| — | alt‑nodejs 20.x | alt‑nodejs 20.x | alt‑nodejs 20.x |
-| — | - | alt‑nodejs 22.x | alt‑nodejs 22.x |
-| — | - | alt‑nodejs 24.x | alt‑nodejs 24.x |
+| CloudLinux 6 | CloudLinux 7 | CloudLinux 8 | CloudLinux 9 | CloudLinux 10 |
+| ---------------- | ---------------- | ---------------- | ---------------- | ---------------- |
+| alt‑nodejs 6.x | alt‑nodejs 6.x | alt‑nodejs 6.x | alt‑nodejs 6.x | alt‑nodejs 12.x |
+| alt‑nodejs 8.x | alt‑nodejs 8.x | alt‑nodejs 8.x | alt‑nodejs 8.x | alt‑nodejs 14.x |
+| alt‑nodejs 9.x | alt‑nodejs 9.x | alt‑nodejs 9.x | alt‑nodejs 9.x | alt‑nodejs 16.x |
+| alt‑nodejs 10.x | alt‑nodejs 10.x | alt‑nodejs 10.x | alt‑nodejs 10.x | alt‑nodejs 18.x |
+| alt‑nodejs 11.x | alt‑nodejs 11.x | alt‑nodejs 11.x | alt‑nodejs 11.x | alt‑nodejs 20.x |
+| alt‑nodejs 12.x | alt‑nodejs 12.x | alt‑nodejs 12.x | alt‑nodejs 12.x | alt‑nodejs 22.x |
+| alt‑nodejs 14.x | alt‑nodejs 14.x | alt‑nodejs 14.x | alt‑nodejs 14.x | alt‑nodejs 24.x |
+| — | alt‑nodejs 16.x | alt‑nodejs 16.x | alt‑nodejs 16.x | — |
+| — | alt‑nodejs 18.x | alt‑nodejs 18.x | alt‑nodejs 18.x | — |
+| — | alt‑nodejs 19.x | alt‑nodejs 19.x | alt‑nodejs 19.x | — |
+| — | alt‑nodejs 20.x | alt‑nodejs 20.x | alt‑nodejs 20.x | — |
+| — | — | alt‑nodejs 22.x | alt‑nodejs 22.x | — |
+| — | — | alt‑nodejs 24.x | alt‑nodejs 24.x | — |
#### **Requirements**
@@ -5914,7 +5914,7 @@ yum install lvemanager lve-utils
Phusion Passenger could be installed by using **either** ```ea-ruby24-mod_passenger``` **or** ```ea-ruby27-mod_passenger```. ```ea-ruby27-mod_passenger``` is **not** compatible with systems running CloudLinux OS 6. CloudLinux OS 7 supports **both** ```ea-ruby24-mod_passenger``` and ```ea-ruby27-mod_passenger```. If your system runs CloudLinux OS 8, you can **only** use ```ea-ruby27-mod_passenger```.
-
+
:::tip Note
```ea-apache24-mod-alt-passenger``` is deprecated in favor of ```ea-ruby24-mod_passenger``` and ```ea-ruby27-mod_passenger```
:::
@@ -6002,7 +6002,7 @@ yum install cagefs
```
cloudlinux-selector create --interprete=nodejs --json --app-root=
--app-uri= --app-mode=develompent --version= --domain=
```
-
+
::: tip Note
In the
IntelliJ IDEA you can create and run any remote script
(Preferences — Remote SSH External Tools — Add).
@@ -6047,7 +6047,7 @@ The following information should be displayed on this page:
So that, you can be sure that deployed modules are used properly.
-If you’d like to use a different version of Node.js to run an application, change a path to the interpreter in the configuration settings of the running.
+If you’d like to use a different version of Node.js to run an application, change a path to the interpreter in the configuration settings of the running.
To apply all changes to the project, synchronize all changes with the server and restart the running application.
9. To debug a script, set breakpoints in the code and run the configuration via Main Menu
_(Main menu → Run → Debug… → Select configuration)_ .
@@ -6142,7 +6142,7 @@ mod_lsapi PRO is an [Apache HTTP Server](https://httpd.apache.org/) module based
1. Apache passes handling for PHP request to mod_lsapi PRO;
2. mod_lsapi PRO use liblsapi to transfer request to lsphp parent process;
3. lsphp is forking child process which executes the request and returns data to mod_lsapi PRO;
-
+
_mod_lsapi PRO integrates with Apache, allows to handle concurrent requests and manages the lsphp processes_
* If there are no requests for lsapi_backend_pgrp_max_idle seconds, lsphp parent process will be terminated;
@@ -6275,7 +6275,7 @@ Now all domains under php1_mode are using lsphp handler and no further actions a
#### Installing on servers with no control panel
-:::tip Note
+:::tip Note
If there is a php.conf file in Apache's conf.d, which is usually brought by the php or php-fpm packages, then it should be deleted or renamed.
For example, `php.conf` can be renamed into `php.conf.NO`.
@@ -6345,12 +6345,12 @@ Select the control panel you are using:
#### Uninstall procedure for cPanel servers with EasyApache 4
-:::tip Note
+:::tip Note
If there is a php.conf file in Apache's conf.d, which is usually brought by the php or php-fpm packages, then it should be deleted or renamed.
-For example, `php.conf` can be renamed into `php.conf.NO`.
+For example, `php.conf` can be renamed into `php.conf.NO`.
:::
-
+
To remove lsapi handler from cPanel MultiPHP Manager and uninstall mod_lsapi PRO, run a command:
@@ -6521,9 +6521,9 @@ The final lsapi.conf configuration might look like this:
LoadModule lsapi_module modules/mod_lsapi.so
-
- lsapi_engine On
- AddType application/x-httpd-lsphp .php
+
+ lsapi_engine On
+ AddType application/x-httpd-lsphp .php
lsapi_backend_connect_timeout 100000
lsapi_backend_connect_tries 10
lsapi_backend_children 20
@@ -6536,7 +6536,7 @@ LoadModule lsapi_module modules/mod_lsapi.so
In order to mod_lsapi PRO work lsapi.conf should be loaded to Apache through [Include](https://httpd.apache.org/docs/2.4/mod/core.html#include) directive.
-For more detailed description of the module directives please visit [Configuration reference](./#configuration-references).
+For more detailed description of the module directives please visit [Configuration reference](./#configuration-references).
For installation guide mod_lsapi PRO please visit [Installation](./#installation-2).
#### Using alternative LVE id for Virtual Hosts
@@ -6601,15 +6601,15 @@ Please note that in the example above 2 different Virtual Hosts use different LV
[mod_lsapi customization](./#mod-lsapi-customization):
-* [lsapi_engine](./#lsapi-engine)
-* [lsapi_socket_path](./#lsapi-socket-path)
-* [lsapi_poll_timeout](./#lsapi-poll-timeout)
-* [lsapi_per_user](./#lsapi-per-user)
-* [lsapi_output_buffering](./#lsapi-output-buffering)
-* [lsapi_disable_reject_mode](./#lsapi-disable-reject-mode)
-* [lsapi_terminate_backends_on_exit](./#lsapi-terminate-backends-on-exit)
-* [lsapi_avoid_zombies](./#lsapi-avoid-zombies)
-* [lsapi_use_req_hostname](./#lsapi-use-req-hostname)
+* [lsapi_engine](./#lsapi-engine)
+* [lsapi_socket_path](./#lsapi-socket-path)
+* [lsapi_poll_timeout](./#lsapi-poll-timeout)
+* [lsapi_per_user](./#lsapi-per-user)
+* [lsapi_output_buffering](./#lsapi-output-buffering)
+* [lsapi_disable_reject_mode](./#lsapi-disable-reject-mode)
+* [lsapi_terminate_backends_on_exit](./#lsapi-terminate-backends-on-exit)
+* [lsapi_avoid_zombies](./#lsapi-avoid-zombies)
+* [lsapi_use_req_hostname](./#lsapi-use-req-hostname)
* [lsapi_debug](./#lsapi-debug)
[Tuning LSPHP backend](./#tuning-lsphp-backend):
@@ -6629,7 +6629,7 @@ Please note that in the example above 2 different Virtual Hosts use different LV
* [lsapi_backend_loglevel_info](./#lsapi-backend-loglevel-info)
* [lsapi_backend_oom_score_adj](./#lsapi-backend-oom-score-adj)
* [lsapi-server-tweak](./#lsapi-server-tweak) Beta
-
+
[Connection pool mode](./#connection-pool-mode):
* [lsapi_with_connection_pool](./#lsapi-with-connection-pool)
* [lsapi_backend_max_idle](./#lsapi-backend-max-idle)
@@ -6671,11 +6671,11 @@ Please note that in the example above 2 different Virtual Hosts use different LV
#### **lsapi_engine**
-**Syntax** : lsapi_engine on/off
-**Default** : lsapi_engine off
-**Context** : httpd.conf, htaccess
+**Syntax** : lsapi_engine on/off
+**Default** : lsapi_engine off
+**Context** : httpd.conf, htaccess
-**Description** :
+**Description** :
Switching mod_lsapi handler on or off.
---
@@ -6683,32 +6683,32 @@ Switching mod_lsapi handler on or off.
#### **lsapi_socket_path**
**Syntax** : lsapi_socket_path [path]
-**Default** : lsapi_socket_path `/var/mod_lsapi`
-**Context** : httpd.conf
+**Default** : lsapi_socket_path `/var/mod_lsapi`
+**Context** : httpd.conf
-**Description:**
+**Description:**
Path to backend lsphp sockets. By default `/var/mod_lsapi`
---
#### **lsapi_poll_timeout**
-**Syntax** : lsapi_poll_timeout [number]
-**Default** : lsapi_poll_timeout 300
-**Context** : httpd.conf, htaccess
+**Syntax** : lsapi_poll_timeout [number]
+**Default** : lsapi_poll_timeout 300
+**Context** : httpd.conf, htaccess
-**Description** :
+**Description** :
Time to wait for response from the lsphp daemon, in seconds. 0 stands for infinity. For preventing long running processes which can use EP (limit number of entry processes). Default value is 300. Should be more or equal to 0. In the case of wrong format, the default value will be used.
---
#### **lsapi_per_user**
-**Syntax** : lsapi_per_user On/Off
-**Default** : lsapi_per_user Off
-**Context** : httpd.conf
+**Syntax** : lsapi_per_user On/Off
+**Default** : lsapi_per_user Off
+**Context** : httpd.conf
-**Description** :
+**Description** :
Invoke master lsPHP process not per VirtualHost but per account.
When On, invoke backend not per VirtualHost but per account.
Default value is Off.
@@ -6719,22 +6719,22 @@ Then these Virtual Hosts will have a dedicated backend process, while others wil
#### **lsapi_output_buffering**
-**Syntax** : lsapi_output_buffering On/Off
-**Default** : lsapi_output_buffering On
-**Context** : httpd.conf, virtualhost, htaccess
+**Syntax** : lsapi_output_buffering On/Off
+**Default** : lsapi_output_buffering On
+**Context** : httpd.conf, virtualhost, htaccess
-**Description** :
+**Description** :
Enable or disable output buffering on Apache level. Default value is On.
---
#### **lsapi_disable_reject_mode**
-**Syntax** : lsapi_disable_reject_mode On/Off
-**Default** : lsapi_disable_reject_mode Off
-**Context** : httpd.conf, virtualhost
+**Syntax** : lsapi_disable_reject_mode On/Off
+**Default** : lsapi_disable_reject_mode Off
+**Context** : httpd.conf, virtualhost
-**Description** :
+**Description** :
If a new HTTP request is coming to LSPHP daemon when all LSPHP workers are still busy, it can process this situation in two different ways. In REJECT mode LSPHP daemon will reject such request immediately. Otherwise, in legacy mode, LSPHP daemon will put this request into infinite queue, until one or more LSPHP daemon becomes free. When HTTP request is rejected in REJECT mode, mod_lsapi will write into Apache error_log the following message: Connect to backend rejected, and the client will receive 507 HTTP response.
By default LSPHP daemon in CloudLinux OS uses REJECT mode. It can be switched off with this option.
@@ -6742,55 +6742,55 @@ By default LSPHP daemon in CloudLinux OS uses REJECT mode. It can be switched of
#### **lsapi_terminate_backends_on_exit**
-**Syntax** : lsapi_terminate_backends_on_exit On/Off
-**Default** : lsapi_terminate_backends_on_exit On
-**Context** : httpd.conf
+**Syntax** : lsapi_terminate_backends_on_exit On/Off
+**Default** : lsapi_terminate_backends_on_exit On
+**Context** : httpd.conf
-**Description** :
+**Description** :
httpd.conf, On - stop lsphp services on apache restart, Off - leave live started lsphp services on apache restart (for php+opcache). The lsphp will not restart, even if Apache gets restarted.
---
#### **lsapi_avoid_zombies**
-**Syntax** : lsapi_avoid_zombies On/Off
-**Default** : lsapi_avoid_zombies Off
-**Context** : httpd.conf, virtualhost
+**Syntax** : lsapi_avoid_zombies On/Off
+**Default** : lsapi_avoid_zombies Off
+**Context** : httpd.conf, virtualhost
-**Description** :
+**Description** :
Enable or disable a mechanism to avoid creation of zombie processes by lsphp. Default value is Off.
---
#### **lsapi_use_req_hostname**
-**Syntax** : lsapi_use_req_hostname On/Off
-**Default** : lsapi_use_req_hostname Off
-**Context** : httpd.conf, virtualhosts
+**Syntax** : lsapi_use_req_hostname On/Off
+**Default** : lsapi_use_req_hostname Off
+**Context** : httpd.conf, virtualhosts
-**Description** :
+**Description** :
By default, we are using hostname from the server_rec structure (off), it means that mod_lsapi takes hostname from the VirtualHost section of the configuration file. Using hostname from the request_rec structure (On) means that mod_lsapi takes hostname from the HOST section of the request. It could be useful for those who use dynamically generated configs for virtual hosts for example with mod_lua.
---
#### **lsapi_sentry**
-**Syntax** : lsapi_sentry On/Off
-**Default** : lsapi_sentry On
-**Context** : httpd.conf
+**Syntax** : lsapi_sentry On/Off
+**Default** : lsapi_sentry On
+**Context** : httpd.conf
-**Description** :
+**Description** :
When this option is enabled, errors that occur in the operation of the mod_lsapi will be sent to the remote sentry server. You can see the error messages that were sent to the sentry server in the directory /var/log/mod_lsapi. If you do not want to send error notifications from your server, you can disable this directive in lsapi.conf.
---
#### **lsapi_debug**
-**Syntax** : lsapi_debug On/Off
-**Default** : lsapi_debug Off
-**Context** : httpd.conf, virtualhost
+**Syntax** : lsapi_debug On/Off
+**Default** : lsapi_debug Off
+**Context** : httpd.conf, virtualhost
-**Description** :
+**Description** :
Extended debug logging.
---
@@ -6799,14 +6799,14 @@ Extended debug logging.
#### **lsapi_set_env**
-**Syntax** : lsapi_set_env VAR_NAME [VAR_VALUE]
-**Default** : -
-**Context** : httpd.conf
+**Syntax** : lsapi_set_env VAR_NAME [VAR_VALUE]
+**Default** : -
+**Context** : httpd.conf
-**Description** :
-Pass env variable to lsphp. By default lsphp environment have only TEMP, TMP and PATH variables set.
-Example: lsapi_set_env TMP "/var/lsphp-tmp"
-Note: PATH env var default "/usr/local/bin:/usr/bin:/bin" cannot be changed because of security reasons.
+**Description** :
+Pass env variable to lsphp. By default lsphp environment have only TEMP, TMP and PATH variables set.
+Example: lsapi_set_env TMP "/var/lsphp-tmp"
+Note: PATH env var default "/usr/local/bin:/usr/bin:/bin" cannot be changed because of security reasons.
To change it, use explicitly lsapi_set_env_path option.
:::tip Beta
@@ -6817,11 +6817,11 @@ When the `lsapi_server_tweak` option is switched `On`, this option can be used i
#### **lsapi_set_env_path**
-**Syntax** : lsapi_set_env_path [path(s)]
-**Default** : lsapi_set_env_path /usr/local/bin:/usr/bin:/bin
-**Context** : httpd.conf
+**Syntax** : lsapi_set_env_path [path(s)]
+**Default** : lsapi_set_env_path /usr/local/bin:/usr/bin:/bin
+**Context** : httpd.conf
-**Description** :
+**Description** :
Change PATH variable in the environment of lsPHP processes. Default path /usr/local/bin:/usr/bin:/bin will be used if not set.
:::tip Beta
@@ -6832,11 +6832,11 @@ When the `lsapi_server_tweak` option is switched `On`, this option can be used i
#### **lsapi_backend_children**
-**Syntax** : lsapi_backend_children [number]
-**Default** : lsapi_backend_children [EP]
-**Context** : httpd.conf
+**Syntax** : lsapi_backend_children [number]
+**Default** : lsapi_backend_children [EP]
+**Context** : httpd.conf
-**Description** :
+**Description** :
Sets maximum number of simultaneously running child backend processes. Optional, a default directive value is equal to 120. LSAPI_CHILDREN environment variable is set according to the following rules:
* If NPROC and EP are unlimited, the directive value is used.
* If NPROC is set to any limited value and the directive value is set to a number less than NPROC-1, the directive value is used.
@@ -6849,117 +6849,117 @@ For example, with the default lve settings NPROC=100 and EP=20, the effective LS
#### **lsapi_backend_connect_tries**
-**Syntax** : lsapi_backend_connect_tries [number]
-**Default** : lsapi_backend_connect_tries 20
-**Context** : httpd.conf
+**Syntax** : lsapi_backend_connect_tries [number]
+**Default** : lsapi_backend_connect_tries 20
+**Context** : httpd.conf
-**Description** :
+**Description** :
Number of retries to connects to lsPHP daemon.
---
#### **lsapi_backend_connect_timeout**
-**Syntax** : lsapi_backend_connect_timeout [number]
-**Default** : lsapi_backend_connect_timeout 500000
-**Context** : httpd.conf
+**Syntax** : lsapi_backend_connect_timeout [number]
+**Default** : lsapi_backend_connect_timeout 500000
+**Context** : httpd.conf
-**Description** :
+**Description** :
Number of usec to wait while lsPHP starts (if not started on request).
---
#### **lsapi_backend_max_process_time**
-**Syntax** : lsapi_backend_max_process_time [number]
-**Default** : lsapi_backend_max_process_time 300
-**Context** : httpd.conf, virtualhost
+**Syntax** : lsapi_backend_max_process_time [number]
+**Default** : lsapi_backend_max_process_time 300
+**Context** : httpd.conf, virtualhost
-**Description** :
-Sets env variable LSAPI_MAX_PROCESS_TIME
-Optional. Default value is 300.
+**Description** :
+Sets env variable LSAPI_MAX_PROCESS_TIME
+Optional. Default value is 300.
Timeout to kill runaway processes.
---
#### **lsapi_backend_pgrp_max_idle**
-**Syntax** : lsapi_backend_pgrp_max_idle [number]
-**Default** : lsapi_backend_pgrp_max_idle 30
-**Context** : httpd.conf
+**Syntax** : lsapi_backend_pgrp_max_idle [number]
+**Default** : lsapi_backend_pgrp_max_idle 30
+**Context** : httpd.conf
-**Description** :
-Sets env variable LSAPI_PGRP_MAX_IDLE, in seconds.
-Controls how long a control process will wait for a new request before it exits. # 0 stands for infinite.
-Optional, default value is 30.
-Should be more or equal to 0.
+**Description** :
+Sets env variable LSAPI_PGRP_MAX_IDLE, in seconds.
+Controls how long a control process will wait for a new request before it exits. # 0 stands for infinite.
+Optional, default value is 30.
+Should be more or equal to 0.
---
#### **lsapi_backend_use_own_log**
-**Syntax** : lsapi_backend_use_own_log On/Off
-**Default** : lsapi_backend_use_own_log Off
-**Context** : httpd.conf, virtualhost
+**Syntax** : lsapi_backend_use_own_log On/Off
+**Default** : lsapi_backend_use_own_log Off
+**Context** : httpd.conf, virtualhost
-**Description** :
+**Description** :
Redirecting log output of backend processes from Apache error_log to dedicated log file or files, depending on value of lsapi_backend_common_own_log option. If Off, use Apache error log file for backend output, or separate file otherwise.
---
#### **lsapi_backend_common_own_log**
-**Syntax** : lsapi_backend_common_own_log On/Off
-**Default** : lsapi_backend_common_own_log Off
-**Context** : httpd.conf, virtualhost
+**Syntax** : lsapi_backend_common_own_log On/Off
+**Default** : lsapi_backend_common_own_log Off
+**Context** : httpd.conf, virtualhost
-**Description** :
+**Description** :
It will be used only when lsapi_backend_use_own_log set to On. On - backend processes of the all virtual hosts will share the common log file. Off - every virtual host will have its own backend log file.
---
#### **lsapi_backend_coredump**
-**Syntax** : lsapi_backend_coredump On/Off
-**Default** : lsapi_backend_coredump Off
-**Context** : httpd.conf, htaccess
+**Syntax** : lsapi_backend_coredump On/Off
+**Default** : lsapi_backend_coredump Off
+**Context** : httpd.conf, htaccess
-**Description** :
-env variable LSAPI_ALLOW_CORE_DUMP (On or Off). Pass LSAPI_ALLOW_CORE_DUMP to lsphp or not. If it will be passed - core dump on lsphp crash will be created.
-Off by default.
+**Description** :
+env variable LSAPI_ALLOW_CORE_DUMP (On or Off). Pass LSAPI_ALLOW_CORE_DUMP to lsphp or not. If it will be passed - core dump on lsphp crash will be created.
+Off by default.
By default LSAPI application will not leave a core dump file when crashed. If you want to have LSAPI PHP dump a core file, you should set this environment variable. If set, regardless the value has been set to, core files will be created under the directory that the PHP script in.
---
#### **lsapi_backend_accept_notify**
-**Syntax** : lsapi_backend_accept_notify On/Off
-**Default** : lsapi_backend_accept_notify On
-**Context** : httpd.conf, virtualhost
+**Syntax** : lsapi_backend_accept_notify On/Off
+**Default** : lsapi_backend_accept_notify On
+**Context** : httpd.conf, virtualhost
-**Description** :
+**Description** :
Switch LSAPI_ACCEPT_NOTIFY mode for lsphp. This option can be used both in Global and VirtualHost scopes.This mode is incompatible with PHP 4.4.
---
#### **lsapi_backend_pgrp_max_reqs**
-**Syntax** : lsapi_backend_prgrp_max_reqs [number]
-**Default** : lsapi_backend_max_reqs 0
-**Context** : httpd.conf, virtualhost
+**Syntax** : lsapi_backend_prgrp_max_reqs [number]
+**Default** : lsapi_backend_max_reqs 0
+**Context** : httpd.conf, virtualhost
-**Description** :
+**Description** :
Controls how many requests a control process will process before it exits. Should be more or equal to 0. In the case of wrong format, a default value will be used. Optional, the default value is 0, which means an unlimited number of requests.
---
#### **lsapi_backend_pgrp_max_crashes**
-**Syntax** : lsapi_backend_prgrp_max_crashes [number]
-**Default** : lsapi_backend_max_crashes 0
+**Syntax** : lsapi_backend_prgrp_max_crashes [number]
+**Default** : lsapi_backend_max_crashes 0
**Context** : httpd.conf, virtualhost
-**Description** :
+**Description** :
Controls how many crashes of its worker processes a control process will detect before it exits. Should be more or equal to 0. In the case of wrong format, a default value will be used. Optional, the default value is 0, which means an unlimited number of crashes.
---
@@ -7006,33 +7006,33 @@ For more information on setting value **oom_score_adj**, see the page [https://m
#### **lsapi_with_connection_pool**
-**Syntax** : lsapi_with_connection_pool On/Off
-**Default** : lsapi_with_connection_pool Off
-**Context** : httpd.conf
+**Syntax** : lsapi_with_connection_pool On/Off
+**Default** : lsapi_with_connection_pool Off
+**Context** : httpd.conf
-**Description** :
+**Description** :
On/Off - disable enable connect pool, default is Off.
---
#### **lsapi_backend_max_idle**
-**Syntax** : lsapi_backend_max_idle [number]
-**Default** : lsapi_backend_max_idle 300
-**Context** : httpd.conf
+**Syntax** : lsapi_backend_max_idle [number]
+**Default** : lsapi_backend_max_idle 300
+**Context** : httpd.conf
-**Description** :
+**Description** :
It is relevant only with lsapi_with_connection_pool option switched on. Controls how long a worker process will wait for a new request before it exits. 0 stands for infinite. Should be more or equal to 0. In the case of wrong format default value will be used. Optional, default value is 300.
---
#### **lsapi_backend_max_reqs**
-**Syntax** : lsapi_backend_max_reqs [number]
-**Default** : lsapi_backend_max_reqs 10000
-**Context** : httpd.conf
+**Syntax** : lsapi_backend_max_reqs [number]
+**Default** : lsapi_backend_max_reqs 10000
+**Context** : httpd.conf
-**Description** :
+**Description** :
It is relevant only with lsapi_with_connection_pool option switched on. Controls how many requests a worker process will process before it exits. Should be more than 0. In the case of wrong format default value will be used. Optional, default value is 10000.
---
@@ -7041,90 +7041,90 @@ It is relevant only with lsapi_with_connection_pool option switched on. Controls
#### **lsapi_criu**
-**Syntax** : lsapi_criu On/Off
-**Default** : lsapi_criu Off
-**Context** : httpd.conf
+**Syntax** : lsapi_criu On/Off
+**Default** : lsapi_criu Off
+**Context** : httpd.conf
-**Description** :
+**Description** :
Enable/disable CRIU for lsphp freezing. Default: Off.
---
#### **lsapi_criu_socket_path**
-**Syntax** : lsapi_criu_socket_path [path]
-**Default** : lsapi_criu_socket_path /var/run/criu/criu_service.socket
-**Context** : httpd.conf
+**Syntax** : lsapi_criu_socket_path [path]
+**Default** : lsapi_criu_socket_path /var/run/criu/criu_service.socket
+**Context** : httpd.conf
-**Description** :
+**Description** :
Set path to socket for communication with criu service. Default: /var/run/criu/criu_service.socket.
---
#### **lsapi_criu_imgs_dir_path**
-**Syntax** : lsapi_criu_imgs_dir_path [path]
-**Default** : lsapi_criu_imgs_dir_path /var/mod_lsapi/
-**Context** : httpd.conf
+**Syntax** : lsapi_criu_imgs_dir_path [path]
+**Default** : lsapi_criu_imgs_dir_path /var/mod_lsapi/
+**Context** : httpd.conf
-**Description** :
+**Description** :
Path to folder where images of freezed PHP will be stored. Should be path. Default: /var/mod_lsapi/
---
#### **lsapi_backend_initial_start**
-**Syntax** : lsapi_backend_initial_start [number]
-**Default** : lsapi_backend_initial_start 0
-**Context** : httpd.conf
+**Syntax** : lsapi_backend_initial_start [number]
+**Default** : lsapi_backend_initial_start 0
+**Context** : httpd.conf
-**Description** :
+**Description** :
Number of requests to virtualhost, when lsphp will be freezed. Default: 0 - means disable freezing.
---
#### **lsapi_criu_use_shm**
-**Syntax** : lsapi_criu_use_shm Off/Signals
-**Default** : lsapi_criu_use_shm Off
-**Context** : httpd.conf
+**Syntax** : lsapi_criu_use_shm Off/Signals
+**Default** : lsapi_criu_use_shm Off
+**Context** : httpd.conf
-**Description** :
+**Description** :
Method of requests counting. Off - use shared memory. Signals - use signals from child processes to parent. Default: Off
---
#### **lsapi_backend_semtimedwait**
-**Syntax** : lsapi_backend_semtimedwait On/Off
-**Default** : lsapi_backend_semtimedwait On
-**Context** : httpd.conf
+**Syntax** : lsapi_backend_semtimedwait On/Off
+**Default** : lsapi_backend_semtimedwait On
+**Context** : httpd.conf
-**Description** :
+**Description** :
Use semaphore for checking when lsphp process will be started. Speed of start lsphp increased with semaphore using. This method avoid cycles of waiting for lsphp start. Default: On.
----
#### **lsapi_reset_criu_on_apache_restart**
-**Syntax** : lsapi_reset_criu_on_apache_restart On/Off
-**Default** : lsapi_reset_criu_on_apache_restart Off
-**Context** : httpd.conf, virtualhost
+**Syntax** : lsapi_reset_criu_on_apache_restart On/Off
+**Default** : lsapi_reset_criu_on_apache_restart Off
+**Context** : httpd.conf, virtualhost
-**Description** :
-This option allows cleaning all CRIU images on Apache restart.
-Setting lsapi_reset_criu_on_apache_restart to On means that on each Apache restart the CRIU images which are stored in directory specified by lsapi_criu_imgs_dir_path directive will be recreated on new request to domain(only after restart).
+**Description** :
+This option allows cleaning all CRIU images on Apache restart.
+Setting lsapi_reset_criu_on_apache_restart to On means that on each Apache restart the CRIU images which are stored in directory specified by lsapi_criu_imgs_dir_path directive will be recreated on new request to domain(only after restart).
If this option set to Off then CRIU images won’t be recreated on Apache restart.
----
#### **lsapi_criu_debug**
-**Syntax**: lsapi_criu_debug On/Off
-**Default**: lsapi_criu_debug Off
-**Context**: httpd.conf, virtualhost
+**Syntax**: lsapi_criu_debug On/Off
+**Default**: lsapi_criu_debug Off
+**Context**: httpd.conf, virtualhost
-**Description** :
+**Description** :
Enable/disable CRIU related debug logging.
----
@@ -7133,108 +7133,108 @@ Enable/disable CRIU related debug logging.
#### **lsapi_process_phpini**
-**Syntax** : lsapi_process_phpini On/Off
-**Default** : lsapi_process_phpini Off
-**Context** : httpd.conf, virtualhost, directory
+**Syntax** : lsapi_process_phpini On/Off
+**Default** : lsapi_process_phpini Off
+**Context** : httpd.conf, virtualhost, directory
-**Description** :
+**Description** :
Enable or disable phpini_* directive processing. Default value is Off.
---
#### **lsapi_phpini**
-**Syntax** : lsapi_phpini [path]
-**Default** : lsapi_phpini -
-**Context** : httpd.conf, virtualhost, htaccess
+**Syntax** : lsapi_phpini [path]
+**Default** : lsapi_phpini -
+**Context** : httpd.conf, virtualhost, htaccess
-**Description** :
+**Description** :
When lsapi_process_phpini option switched to Off, these values will be silently ignored. lsapi_phpini values with absolute filename of php.ini file can be inserted into .htaccess files in order to set custom php.ini which will override/complement settings from system default php.ini.
---
#### **lsapi_phprc**
-**Syntax** : lsapi_phprc [No | Env | Auto | DocRoot]
-**Default** : lsapi_phprc No
-**Context** : httpd.conf, virtualhost
+**Syntax** : lsapi_phprc [No | Env | Auto | DocRoot]
+**Default** : lsapi_phprc No
+**Context** : httpd.conf, virtualhost
**Description** :
-The value of PHPRC env variable.
-Special values are "No", "Env", "Auto" and "DocRoot".
-Default value is "No" - without PHPRC at all.
-"Auto" value stands for php.ini from DocumentRoot of the corresponding VirtualHost if it is present, or from user's home directory otherwise "DocRoot" value stands for php.ini from DocumentRoot of the corresponding VirtualHost.
-"Env" value for using PHPRC from the environment, to set it with SetEnv config option, for example
-lsapi_phprc No
-lsapi_phprc Auto
-lsapi_phprc DocRoot
-lsapi_phprc Env
+The value of PHPRC env variable.
+Special values are "No", "Env", "Auto" and "DocRoot".
+Default value is "No" - without PHPRC at all.
+"Auto" value stands for php.ini from DocumentRoot of the corresponding VirtualHost if it is present, or from user's home directory otherwise "DocRoot" value stands for php.ini from DocumentRoot of the corresponding VirtualHost.
+"Env" value for using PHPRC from the environment, to set it with SetEnv config option, for example
+lsapi_phprc No
+lsapi_phprc Auto
+lsapi_phprc DocRoot
+lsapi_phprc Env
lsapi_phprc /etc/
---
#### **lsapi_tmpdir**
-**Syntax** : lsapi_tmpdir [path]
-**Default** : lsapi_tmpdir /tmp
-**Context** : httpd.conf, virtualhost
+**Syntax** : lsapi_tmpdir [path]
+**Default** : lsapi_tmpdir /tmp
+**Context** : httpd.conf, virtualhost
-**Description** :
+**Description** :
Set alternate request body temporary files directory.
---
#### **lsapi_enable_user_ini**
-**Syntax** : lsapi_enable_user_ini On/Off
-**Default** : lsapi_enable_user_ini Off
-**Context** : httpd.conf, virtualhost
+**Syntax** : lsapi_enable_user_ini On/Off
+**Default** : lsapi_enable_user_ini Off
+**Context** : httpd.conf, virtualhost
-**Description** :
+**Description** :
Enable .user.ini files for backend. Same as suphp, php-fpm and fcgid mechanism of .user.ini. Default value is Off.
---
#### **lsapi_user_ini_homedir**
-**Syntax** : lsapi_user_ini_homedir On/Off
-**Default** : lsapi_user_ini_homedir Off
-**Context** : httpd.conf, virtualhost
+**Syntax** : lsapi_user_ini_homedir On/Off
+**Default** : lsapi_user_ini_homedir Off
+**Context** : httpd.conf, virtualhost
-**Description** :
+**Description** :
If lsapi_enable_user_ini option is set to On, then enable/disable processing .user.ini file in home directory also. Default value is Off.
---
#### **lsapi_keep_http200**
-**Syntax** : lsapi_keep_http200 On/Off
-**Default** : lsapi_keep_http200 Off
-**Context** : httpd.conf, .htaccess
+**Syntax** : lsapi_keep_http200 On/Off
+**Default** : lsapi_keep_http200 Off
+**Context** : httpd.conf, .htaccess
-**Description** :
+**Description** :
If set to On, always keep backend's response status as mod_php does. If set to Off, response status can be overridden by Apache as suphp does (in case of call via ErrorDocument directive).
---
#### **lsapi_mod_php_behaviour**
-**Syntax** : lsapi_mod_php_behaviour On/Off
-**Default** : lsapi_mod_php_behaviour On
-**Context** : httpd.conf, virtualhost, directory
+**Syntax** : lsapi_mod_php_behaviour On/Off
+**Default** : lsapi_mod_php_behaviour On
+**Context** : httpd.conf, virtualhost, directory
-**Description** :
+**Description** :
On/Off - disable php_* directives, default On.
---
#### **php_value, php_admin_value, php_flag, php_admin_flag**
-**Syntax** : [php_value|php_admin_value|php_flag|php_admin_flag]
-**Default** :
-**Context** : httpd.conf, virtualhost, htaccess
+**Syntax** : [php_value|php_admin_value|php_flag|php_admin_flag]
+**Default** :
+**Context** : httpd.conf, virtualhost, htaccess
-**Description** :
+**Description** :
mod_php emulation.
---
@@ -7243,99 +7243,99 @@ mod_php emulation.
#### **lsapi_use_suexec**
-**Syntax** : lsapi_use_suexec On/Off
-**Default** : lsapi_use_suexec On
-**Context** : httpd.conf
+**Syntax** : lsapi_use_suexec On/Off
+**Default** : lsapi_use_suexec On
+**Context** : httpd.conf
-**Description** :
+**Description** :
Use or not suexec to a target user.
---
#### **lsapi_user_group**
-**Syntax** : lsapi_user_group [user_name] [group_name]
-**Default** : -
-**Context** : httpd.conf, virtualhost, directory
+**Syntax** : lsapi_user_group [user_name] [group_name]
+**Default** : -
+**Context** : httpd.conf, virtualhost, directory
-**Description** :
-Set user & group for requests.
+**Description** :
+Set user & group for requests.
---
#### **lsapi_uid_gid**
-**Syntax** : lsapi_uid_gid [uid] [gid]
-**Default** : -
-**Context** : httpd.conf, virtualhost, directory
+**Syntax** : lsapi_uid_gid [uid] [gid]
+**Default** : -
+**Context** : httpd.conf, virtualhost, directory
-**Description** :
+**Description** :
Set user & group for request.
---
#### **lsapi_use_default_uid**
-**Syntax** : lsapi_use_default_uid On/Off
-**Default** : lsapi_use_default_uid On
-**Context** : httpd.conf
+**Syntax** : lsapi_use_default_uid On/Off
+**Default** : lsapi_use_default_uid On
+**Context** : httpd.conf
-**Description** :
+**Description** :
Use default Apache UID/GID if no uid/gid set. Values: On/Off. If Off, and no UID/GID set, error 503 will be returned.
---
#### **lsapi_target_perm**
-**Syntax** : lsapi_target_perm On/Off
-**Default** : lsapi_target_perm Off
-**Context** : httpd.conf
+**Syntax** : lsapi_target_perm On/Off
+**Default** : lsapi_target_perm Off
+**Context** : httpd.conf
-**Description** :
+**Description** :
Check target PHP script permissions. If set to On, lsapi will check that script is owned by the same user, as user under which it is being executed. Return 503 error if they don't match. Default: Off.
---
#### **lsapi_paranoid**
-**Syntax** : lsapi_paranoid On/Off
-**Default** : lsapi_paranoid Off
-**Context** : httpd.conf
+**Syntax** : lsapi_paranoid On/Off
+**Default** : lsapi_paranoid Off
+**Context** : httpd.conf
-**Description** :
+**Description** :
Check or not permissions of target php scripts. Optional, default value is Off.
---
#### **lsapi_check_document_root**
-**Syntax** : lsapi_check_document_root On/Off
-**Default** : lsapi_check_document_root On
-**Context** : httpd.conf
+**Syntax** : lsapi_check_document_root On/Off
+**Default** : lsapi_check_document_root On
+**Context** : httpd.conf
-**Description** :
+**Description** :
Check or not owner of DOCUMENT_ROOT. Optional, default value is On.
---
#### **lsapi_disable_forced_pwd_var**
-**Syntax** : lsapi_disable_forced_pwd_var On/Off
-**Default** : lsapi_disable_forced_pwd_var Off
-**Context** : httpd.conf, virtualhost
+**Syntax** : lsapi_disable_forced_pwd_var On/Off
+**Default** : lsapi_disable_forced_pwd_var Off
+**Context** : httpd.conf, virtualhost
-**Description** :
+**Description** :
To disable addition of PWD variable. Default value is Off. If set to On, the PWD variable will not be added into a backend environment.
---
#### **lsapi_max_resend_buffer**
-**Syntax** : lsapi_max_resend_buffer [number]tmp
-**Default** : lsapi_max_resend_buffer 200
-**Context** : httpd.conf, virtualhost
+**Syntax** : lsapi_max_resend_buffer [number]tmp
+**Default** : lsapi_max_resend_buffer 200
+**Context** : httpd.conf, virtualhost
-**Description** :
+**Description** :
Maximum buffer in KiB to resend for request that has a body (like POST request body).
@@ -7376,21 +7376,21 @@ If apache runs under a username other than "apache" <
```
-yum install liblsapi liblsapi-devel
-cd ~$ wget [https://repo.cloudlinux.com/cloudlinux/sources/da/mod_lsapi.tar.gz](https://repo.cloudlinux.com/cloudlinux/sources/da/mod_lsapi.tar.gz)
-tar zxvf mod_lsapi.tar.gz
-cd mod-lsapi-0.1-37
-cmake -DHTTPD_USER= .
+yum install liblsapi liblsapi-devel
+cd ~$ wget [https://repo.cloudlinux.com/cloudlinux/sources/da/mod_lsapi.tar.gz](https://repo.cloudlinux.com/cloudlinux/sources/da/mod_lsapi.tar.gz)
+tar zxvf mod_lsapi.tar.gz
+cd mod-lsapi-0.1-37
+cmake -DHTTPD_USER= .
make
make install
```
-This will:
+This will:
- Install: /usr/lib/apache/mod_lsapi. so (or to another correct httpd modules path)
- Install: /usr/sbin/sulsphp
:::tip Note
-Starting from 1.1-80 version mod_lsapi uses Apache user name specified in the Apache config file along with user name precompiled with HTTPD_USER definition. So there is no need to change HTTPD_USER definition anymore.
+Starting from 1.1-80 version mod_lsapi uses Apache user name specified in the Apache config file along with user name precompiled with HTTPD_USER definition. So there is no need to change HTTPD_USER definition anymore.
:::
**lsphp started under user apache/nobody**
@@ -7428,7 +7428,7 @@ make
make install
```
-will be installed
+will be installed
- Installing:
/usr/lib/apache/mod_lsapi.so (or another httpd modules path)
- Installing:
/usr/sbin/sulsphp
@@ -7437,9 +7437,9 @@ will be installed
```
-yum install liblsapi liblsapi-devel
+yum install liblsapi liblsapi-devel
cd ~
-wget https://repo.cloudlinux.com/cloudlinux/sources/da/mod_lsapi.tar.gz
+wget https://repo.cloudlinux.com/cloudlinux/sources/da/mod_lsapi.tar.gz
tar zxvf mod_lsapi.tar.gz
cd mod-lsapi-0.1-XX
cmake -DPARENT_NAME="
".
@@ -7623,7 +7623,7 @@ If it is empty:
"items":
...
-
- "include": '"/usr/local/apache/conf/conf.d/*.conf"'
+ "include": '"/usr/local/apache/conf/conf.d/*.conf"'
"listen":
```
@@ -7632,7 +7632,7 @@ If it is empty:
```
-mkdir -p /usr/local/apache/conf/conf.d/;
+mkdir -p /usr/local/apache/conf/conf.d/;
cp /usr/share/lve/modlscapi/confs/lsapi.conf /usr/local/apache/conf/conf.d/lsapi.conf
```
@@ -7691,17 +7691,17 @@ The images of the processes will be saved even if Apache is restarted. But all i
If php.ini or configuration file from php.d is changed, the images must be deleted manually.
:::
-:::tip Note
-CRIU (version lower than criu-lve-3.6-1) can't correctly freeze lsphp with PrivateTmp enabled. For correct work, PrivateTmp must be disabled in httpd.service file .
+:::tip Note
+CRIU (version lower than criu-lve-3.6-1) can't correctly freeze lsphp with PrivateTmp enabled. For correct work, PrivateTmp must be disabled in httpd.service file .
:::
-To disable it, copy _httpd.service_ to _/etc/systemd/system_ and change there PrivateTmp:
+To disable it, copy _httpd.service_ to _/etc/systemd/system_ and change there PrivateTmp:
```
-cat httpd.service
-............
+cat httpd.service
+............
[Unit]
Description=Apache web server managed by cPanel Easy
@@ -7712,13 +7712,13 @@ ConditionPathExists=!/etc/httpdisable
[Service]Type=forking
ExecStart=/usr/local/cpanel/scripts/restartsrv_httpd --no-verbose
PIDFile=/var/run/apache2/httpd.pid
-PrivateTmp=false
+PrivateTmp=false
[Install]
-WantedBy=multi-user.target
+WantedBy=multi-user.target
```
-Or it would be technically better to provide a small override of service file rather than copying the whole new version in /etc/systemd/system
+Or it would be technically better to provide a small override of service file rather than copying the whole new version in /etc/systemd/system
[http://www.freedesktop.org/software/systemd/man/systemd.unit.html](http://www.freedesktop.org/software/systemd/man/systemd.unit.html)
@@ -7825,7 +7825,7 @@ cd; touch mod_lsapi_reset_me_criu.test.com
```
-where _vhost.conf_ contains:
+where _vhost.conf_ contains:
`ServerName criu.test.com`
This mode is enabled by default and creates a separate lsphp process for each virtual host.
@@ -7854,12 +7854,12 @@ The NGINX LSAPI Module is an extension for the [NGINX](https://www.nginx.com/) w
**What is lsphp?**
-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.
+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 LSAPI Module, this protocol is now available for NGINX.
-Using NGINX LSAPI Module, we have seen higher performance than NGINX with fastcgi+php-fpm,
-easier installation than php-fpm and easier integration with any control panel.
+Using NGINX LSAPI Module, we have seen higher performance than NGINX with fastcgi+php-fpm,
+easier installation than php-fpm and easier integration with any control panel.
NGINX LSAPI Module means faster and more stable dynamic web pages.
**Optional requirements**
@@ -8024,19 +8024,19 @@ server {
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.
-For a more detailed description of the module directives please visit the [Configuration reference](./#configuration-references-2).
+For a more detailed description of the module directives please visit the [Configuration reference](./#configuration-references-2).
For the installation guide for NGINX LSAPI Module please visit [Installation](./#installation-3).
#### Configuration references
[NGINX LSAPI Module customization](./#nginx-lsapi-module-customization):
-* [lsapi_engine](./#lsapi-enabled)
-* [lsapi_sock_path](./#lsapi-sock-path)
-* [lsapi_per_user](./#lsapi-per-user-1)
-* [lsapi_disable_reject_mode](./#lsapi-disable-reject-mode-1)
-* [lsapi_terminate_backends_on_exit](./#lsapi-terminate-backends-on-exit)
-* [lsapi_avoid_zombies](./#lsapi-avoid-zombies)
+* [lsapi_engine](./#lsapi-enabled)
+* [lsapi_sock_path](./#lsapi-sock-path)
+* [lsapi_per_user](./#lsapi-per-user-1)
+* [lsapi_disable_reject_mode](./#lsapi-disable-reject-mode-1)
+* [lsapi_terminate_backends_on_exit](./#lsapi-terminate-backends-on-exit)
+* [lsapi_avoid_zombies](./#lsapi-avoid-zombies)
[Tuning LSPHP backend](./#tuning-lsphp-backend-1):
* [lsapi_set_env](./#lsapi-set-env-1)
@@ -8053,7 +8053,7 @@ For the installation guide for NGINX LSAPI Module please visit [Installation](./
* [lsapi_backend_pgrp_max_crashes](./#lsapi-backend-pgrp-max-crashes-1)
* [lsapi_backend_loglevel_info](./#lsapi-backend-loglevel-info-1)
* [lsapi_backend_oom_score_adj](./#lsapi-backend-oom-score-adj-1)
-
+
[Connection pool mode](./#connection-pool-mode-1):
* [lsapi_with_connection_pool](./#lsapi-with-connection-pool)
* [lsapi_pool_size](./#lsapi-pool-size)
@@ -8090,39 +8090,39 @@ For the installation guide for NGINX LSAPI Module please visit [Installation](./
#### **lsapi_engine**
-**Syntax** : lsapi_engine [on/off]
-**Example** : lsapi_engine on;
-**Default** : off
-**Context** : main config, server config, local config.
-**Type** : Mandatory
+**Syntax** : lsapi_engine [on/off]
+**Example** : lsapi_engine on;
+**Default** : off
+**Context** : main config, server config, local config.
+**Type** : Mandatory
-**Description** :
-Enable/disable LSAPI module for nginx, server, or local directory.
+**Description** :
+Enable/disable LSAPI module for nginx, server, or local directory.
---
#### **lsapi_sock_path**
**Syntax** : lsapi_sock_path [path]
-**Example** : lsapi_sock_path /var/ngx_lsapi;
-**Default** : `/var/ngx_lsapi`
+**Example** : lsapi_sock_path /var/ngx_lsapi;
+**Default** : `/var/ngx_lsapi`
**Context** : main config
-**Type** : Optional
+**Type** : Optional
-**Description:**
+**Description:**
Path to backend lsphp sockets. By default `/var/ngx_lsapi`
---
#### **lsapi_per_user**
-**Syntax** : lsapi_per_user [on/off]
-**Example** : lsapi_per_user off;
-**Default** : off
+**Syntax** : lsapi_per_user [on/off]
+**Example** : lsapi_per_user off;
+**Default** : off
**Context** : server config, location config
-**Type** : Optional
+**Type** : Optional
-**Description** :
+**Description** :
Invoke the master lsPHP process not per VirtualHost, but per account.
When On, invoke backend not per VirtualHost but per account.
Default value is off.
@@ -8131,454 +8131,454 @@ Then these Virtual Hosts will have a dedicated backend process, while others wil
---
-#### **lsapi_disable_reject_mode**
+#### **lsapi_disable_reject_mode**
-**Syntax** : lsapi_disable_reject_mode [on/off]
-**Example** : lsapi_disable_reject_mode on;
-**Default** : off
-**Context** : server config
-**Type** : Optional
+**Syntax** : lsapi_disable_reject_mode [on/off]
+**Example** : lsapi_disable_reject_mode on;
+**Default** : off
+**Context** : server config
+**Type** : Optional
-**Description** :
+**Description** :
If a new HTTP request is coming to LSPHP daemon when all LSPHP workers are still busy, it can process this situation in two different ways. In REJECT mode LSPHP daemon will reject such requests immediately. Otherwise, in legacy mode, LSPHP daemon will put this request into an infinite queue, until one of LSPHP daemons becomes free. When a HTTP request is rejected in REJECT mode, mod_lsapi will write the following message into the NGINX error.log: `Connect to backend rejected`, and the client will receive a 507 HTTP response. By default, the LSPHP daemon in CloudLinux OS uses the REJECT mode. It can be switched off with this option.
---
-#### **lsapi_terminate_backends_on_exit**
+#### **lsapi_terminate_backends_on_exit**
-**Syntax** : lsapi_terminate_backends_on_exit [on/off]
-**Example** : lsapi_terminate_backends_on_exit on;
-**Default** : on
-**Context** : main config
-**Type** : Optional
+**Syntax** : lsapi_terminate_backends_on_exit [on/off]
+**Example** : lsapi_terminate_backends_on_exit on;
+**Default** : on
+**Context** : main config
+**Type** : Optional
-**Description** :
+**Description** :
nginx.conf, on - stop lsphp services on nginx restart, off - leave live started lsphp services on nginx restart (for php+opcache). The lsphp will not restart, even if NGINX gets restarted.
---
-#### **lsapi_avoid_zombies**
+#### **lsapi_avoid_zombies**
-**Syntax** : lsapi_avoid_zombies [on/off]
-**Example** : lsapi_avoid_zombies on;
-**Default** : off
-**Context** : server config
-**Type** : Optional
+**Syntax** : lsapi_avoid_zombies [on/off]
+**Example** : lsapi_avoid_zombies on;
+**Default** : off
+**Context** : server config
+**Type** : Optional
-**Description** :
-Enable or disable a mechanism to avoid the creation of zombie processes by lsphp. The default value is Off.
+**Description** :
+Enable or disable a mechanism to avoid the creation of zombie processes by lsphp. The default value is Off.
---
-#### **lsapi_starter_sock**
+#### **lsapi_starter_sock**
-**Syntax** : lsapi_starter_sock [path]
-**Example** : lsapi_starter_sock /var/run/lsapi-starter.sock;
-**Default** : /var/ngx_lsapi/starter.sock
-**Context** : main config
-**Type** : Optional
+**Syntax** : lsapi_starter_sock [path]
+**Example** : lsapi_starter_sock /var/run/lsapi-starter.sock;
+**Default** : /var/ngx_lsapi/starter.sock
+**Context** : main config
+**Type** : Optional
-**Description** :
-This parameter configures the socket address for the lsphp backend spawner process.
+**Description** :
+This parameter configures the socket address for the lsphp backend spawner process.
---
-#### **lsapi_starter_log**
+#### **lsapi_starter_log**
-**Syntax** : lsapi_starter_log [path]
-**Example** : lsapi_starter_log /var/log/lsapi-starter.log;
-**Default** : -
-**Context** : main config
-**Type** : Optional
+**Syntax** : lsapi_starter_log [path]
+**Example** : lsapi_starter_log /var/log/lsapi-starter.log;
+**Default** : -
+**Context** : main config
+**Type** : Optional
-**Description** :
-This parameter configures the log file address for the lsphp backend spawner process.
+**Description** :
+This parameter configures the log file address for the lsphp backend spawner process.
---
-#### **lsapi_log**
+#### **lsapi_log**
-**Syntax** : lsapi_log [path]
-**Example** : lsapi_log /var/log/lsapi.log;
-**Default** : -
-**Context** : main config
-**Type** : Optional
+**Syntax** : lsapi_log [path]
+**Example** : lsapi_log /var/log/lsapi.log;
+**Default** : -
+**Context** : main config
+**Type** : Optional
-**Description** :
-This parameter configures the log file address for the NGINX LSAPI module context.
-**Note** :
+**Description** :
+This parameter configures the log file address for the NGINX LSAPI module context.
+**Note** :
This parameter only works if the NGINX LSAPI module is built with the NGX_LSAPI_CUSTOM_LOGGER flag. Otherwise, the NGINX logger will be used for LSAPI module logging.
---
#### **Tuning LSPHP backend**
-#### **lsapi_set_env**
+#### **lsapi_set_env**
-**Syntax** : lsapi_set_env [var] [value]
-**Example**: lsapi_set_env TMP "/var/lsphp-tmp";
-**Default** : -
-**Context** : main config
-**Type** : Optional
+**Syntax** : lsapi_set_env [var] [value]
+**Example**: lsapi_set_env TMP "/var/lsphp-tmp";
+**Default** : -
+**Context** : main config
+**Type** : Optional
-**Description** :
-Pass an environment variable to lsphp. By default the lsphp environment has only TEMP, TMP and PATH variables set.
-Note: PATH env var default "/usr/local/bin:/usr/bin:/bin" cannot be changed because of security reasons.
+**Description** :
+Pass an environment variable to lsphp. By default the lsphp environment has only TEMP, TMP and PATH variables set.
+Note: PATH env var default "/usr/local/bin:/usr/bin:/bin" cannot be changed because of security reasons.
---
-#### **lsapi_set_env_path**
+#### **lsapi_set_env_path**
-**Syntax** : lsapi_set_env_path [path(s)]
-**Default** : lsapi_set_env_path /usr/local/bin:/usr/bin:/bin
-**Context** : main config
-**Type** : Optional
+**Syntax** : lsapi_set_env_path [path(s)]
+**Default** : lsapi_set_env_path /usr/local/bin:/usr/bin:/bin
+**Context** : main config
+**Type** : Optional
-**Description** :
-Change PATH variable in the environment of lsphp processes. Default path /usr/local/bin:/usr/bin:/bin will be used if not set.
+**Description** :
+Change PATH variable in the environment of lsphp processes. Default path /usr/local/bin:/usr/bin:/bin will be used if not set.
---
-#### **lsapi_backend_children**
+#### **lsapi_backend_children**
-**Syntax** : lsapi_backend_children [number]
-**Example** : lsapi_backend_children 300;
-**Default** : 120
-**Context** : server config
-**Type** : Optional
+**Syntax** : lsapi_backend_children [number]
+**Example** : lsapi_backend_children 300;
+**Default** : 120
+**Context** : server config
+**Type** : Optional
-**Description** :
+**Description** :
Sets the maximum number of simultaneously running child backend processes. Optional - a default directive value is equal to 120.
---
#### **lsapi_backend_connect_tries**
-**Syntax** : lsapi_backend_connect_tries [number]
-**Example** : lsapi_backend_connect_tries 20;
-**Default** : 10
-**Context** : server config
-**Type** : Optional
+**Syntax** : lsapi_backend_connect_tries [number]
+**Example** : lsapi_backend_connect_tries 20;
+**Default** : 10
+**Context** : server config
+**Type** : Optional
-**Description** :
+**Description** :
Number of retries for connections to the lsPHP daemon.
---
-#### **lsapi_backend_max_process_time**
+#### **lsapi_backend_max_process_time**
-**Syntax** : lsapi_backend_max_process_time [number]
-**Example** : lsapi_backend_max_process_time 300;
-**Default** : 300
-**Context** : server config
-**Type** : Optional
+**Syntax** : lsapi_backend_max_process_time [number]
+**Example** : lsapi_backend_max_process_time 300;
+**Default** : 300
+**Context** : server config
+**Type** : Optional
-**Description** :
+**Description** :
Sets the env variable LSAPI_MAX_PROCESS_TIME. Optional - default value is 300. Timeout to kill runaway processes.
---
-#### **lsapi_backend_common_own_log**
+#### **lsapi_backend_common_own_log**
-**Syntax** : lsapi_backend_common_own_log [on/off]
-**Example** : lsapi_backend_common_own_log on;
-**Default** : off
-**Context** : server config
-**Type** : Optional
+**Syntax** : lsapi_backend_common_own_log [on/off]
+**Example** : lsapi_backend_common_own_log on;
+**Default** : off
+**Context** : server config
+**Type** : Optional
-**Description** :
+**Description** :
It will be used only when lsapi_backend_use_own_log is set to On. On-backend processes of the all virtual hosts will share the common log file. Off - every virtual host will have its own backend log file.
---
-#### **lsapi_backend_use_own_log**
+#### **lsapi_backend_use_own_log**
-**Syntax** : lsapi_backend_use_own_log [on/off]
-**Example** : lsapi_backend_use_own_log on;
-**Default** : off
-**Context** : server config
-**Type** : Optional
+**Syntax** : lsapi_backend_use_own_log [on/off]
+**Example** : lsapi_backend_use_own_log on;
+**Default** : off
+**Context** : server config
+**Type** : Optional
-**Description** :
+**Description** :
Redirecting log output of backend processes from NGINX error.log to dedicated log file or files, depending on the value of the lsapi_backend_common_own_log option. If off, use the NGINX error log file for backend output, or a separate file otherwise.
---
-#### **lsapi_backend_pgrp_max_crashes**
+#### **lsapi_backend_pgrp_max_crashes**
-**Syntax** : lsapi_backend_pgrp_max_crashes [number]
-**Example** : lsapi_backend_pgrp_max_crashes 300;
-**Default** : 300
-**Context** : server config
-**Type** : Optional
+**Syntax** : lsapi_backend_pgrp_max_crashes [number]
+**Example** : lsapi_backend_pgrp_max_crashes 300;
+**Default** : 300
+**Context** : server config
+**Type** : Optional
-**Description** :
+**Description** :
Controls how many crashes of its worker processes a control process will detect before it exits. Should be more or equal to 0. In the case of a wrong format, a default value will be used. Optional, the default value is 0, which means an unlimited number of crashes.
---
-#### **lsapi_backend_pgrp_max_idle**
+#### **lsapi_backend_pgrp_max_idle**
-**Syntax** : lsapi_backend_pgrp_max_idle [number]
-**Example** : lsapi_backend_pgrp_max_idle 30;
-**Default** : 30
-**Context** : server config
-**Type** : Optional
+**Syntax** : lsapi_backend_pgrp_max_idle [number]
+**Example** : lsapi_backend_pgrp_max_idle 30;
+**Default** : 30
+**Context** : server config
+**Type** : Optional
-**Description** :
+**Description** :
Sets env variable LSAPI_PGRP_MAX_IDLE, in seconds. Controls how long a control process will wait for a new request before it exits. 0 stands for infinite. Optional, default value is 30. Should be more or equal to 0.
---
-#### **lsapi_backend_pgrp_max_reqs**
+#### **lsapi_backend_pgrp_max_reqs**
-**Syntax** : lsapi_backend_pgrp_max_reqs [number]
-**Example** : lsapi_backend_pgrp_max_reqs 0;
-**Default** : 0
-**Context** : server config
-**Type** : Optional
+**Syntax** : lsapi_backend_pgrp_max_reqs [number]
+**Example** : lsapi_backend_pgrp_max_reqs 0;
+**Default** : 0
+**Context** : server config
+**Type** : Optional
-**Description** :
+**Description** :
Controls how many requests a control process will process before it exits. Should be more or equal to 0. In the case of a wrong format, the default value will be used. Optional, the default value is 0, which means an unlimited number of requests.
---
-#### **lsapi_backend_loglevel_info**
+#### **lsapi_backend_loglevel_info**
**Syntax**: lsapi_backend_loglevel_info [on/off]
**Example**: lsapi_backend_loglevel_info on;
**Example**: off
**Context**: server config, location config
-**Type** : Optional
+**Type** : Optional
-**Description**:
+**Description**:
Controls which log level will be used to write PHP warnings and notices into NGINX’s error.log. Optional, the default value is `off`. In that case, the `warn` log level will be used. Otherwise, with `on` value, the `info` log level will be used.
---
-#### **lsapi_backend_oom_score_adj**
+#### **lsapi_backend_oom_score_adj**
-**Syntax** : lsapi_backend_oom_score_adj [number]
-**Example** : lsapi_backend_oom_score_adj 100;
-**Default** : 0
-**Context** : server config
-**Type** : Optional
+**Syntax** : lsapi_backend_oom_score_adj [number]
+**Example** : lsapi_backend_oom_score_adj 100;
+**Default** : 0
+**Context** : server config
+**Type** : Optional
-**Description** :
+**Description** :
This option can apply oom_score_adj values for PHP processes created by mod_lsapi. Value is an integer in the -1000 to 1000 range. The lower the value, the lower the chance that the process will be killed. When your server becomes low on free memory and an OOM killer is invoked, then it may be desirable for lsphp processes to be sacrificed to free up memory. To do this, you need to set oom_score_adj to a large value. For more information on setting a proper value for oom_score_adj, see the page https://man7.org/linux/man-pages/man5/proc.5.html
---
-#### **lsapi_dump_debug_info**
+#### **lsapi_dump_debug_info**
-**Syntax** : lsapi_dump_debug_info [on/off]
-**Example** : lsapi_dump_debug_info on;
-**Default** : off
-**Context** : server config
-**Type** : Optional
+**Syntax** : lsapi_dump_debug_info [on/off]
+**Example** : lsapi_dump_debug_info on;
+**Default** : off
+**Context** : server config
+**Type** : Optional
-**Description** :
-Enable or not lsphp backend debug information dump.
+**Description** :
+Enable or not lsphp backend debug information dump.
---
-#### **lsapi_backend_accept_notify**
+#### **lsapi_backend_accept_notify**
-**Syntax** : lsapi_backend_accept_notify [on/off]
-**Example** : lsapi_backend_accept_notify on;
-**Default** : off
-**Context** : server config
-**Type** : Optional
+**Syntax** : lsapi_backend_accept_notify [on/off]
+**Example** : lsapi_backend_accept_notify on;
+**Default** : off
+**Context** : server config
+**Type** : Optional
-**Description** :
-Switch LSAPI_ACCEPT_NOTIFY mode for lsphp. This option can be used both in Global and VirtualHost scopes. This mode is incompatible with PHP 4.4.
+**Description** :
+Switch LSAPI_ACCEPT_NOTIFY mode for lsphp. This option can be used both in Global and VirtualHost scopes. This mode is incompatible with PHP 4.4.
---
-#### **lsapi_backend_coredump**
+#### **lsapi_backend_coredump**
-**Syntax** : lsapi_backend_coredump [on/off]
-**Example** : lsapi_backend_coredump on;
-**Default** : off
-**Context** : server config
-**Type** : Optional
+**Syntax** : lsapi_backend_coredump [on/off]
+**Example** : lsapi_backend_coredump on;
+**Default** : off
+**Context** : server config
+**Type** : Optional
-**Description** :
+**Description** :
env variable LSAPI_ALLOW_CORE_DUMP (On or Off). Pass LSAPI_ALLOW_CORE_DUMP to lsphp or not. If it is passed - a core dump on lsphp crash will be created. Off by default. By default LSAPI application will not leave a core dump file when crashed. If you want to have LSAPI PHP dump a core dump file, you should set this environment variable. If set, regardless of the value is has been set to, core dump files will be created under the directory that the PHP script is in.
---
-#### **lsapi_pwd_disabled**
+#### **lsapi_pwd_disabled**
-**Syntax** : lsapi_pwd_disabled [on/off]
-**Example** : lsapi_pwd_disabled on;
-**Default** : off
-**Context** : server config
-**Type** : Optional
+**Syntax** : lsapi_pwd_disabled [on/off]
+**Example** : lsapi_pwd_disabled on;
+**Default** : off
+**Context** : server config
+**Type** : Optional
-**Description** :
-To disable the addition of the PWD variable. The default value is Off. If set to On, the PWD variable will not be added to a backend environment.
+**Description** :
+To disable the addition of the PWD variable. The default value is Off. If set to On, the PWD variable will not be added to a backend environment.
---
-#### **lsapi_handler**
+#### **lsapi_handler**
-**Syntax** : lsapi_handler [string]
-**Example** : lsapi_handler application/x-httpd-lsphp;
-**Default** : -
-**Context** : server config
-**Type** : Mandatory
+**Syntax** : lsapi_handler [string]
+**Example** : lsapi_handler application/x-httpd-lsphp;
+**Default** : -
+**Context** : server config
+**Type** : Mandatory
-**Description** :
-Sets LSPHP handler for server (virtual host) configuration.
+**Description** :
+Sets LSPHP handler for server (virtual host) configuration.
---
#### **Connection pool mode**
-#### **lsapi_with_connection_pool**
+#### **lsapi_with_connection_pool**
-**Syntax** : lsapi_with_connection_pool [on/off]
-**Example** : lsapi_with_connection_pool off;
-**Default** : on
-**Context** : main config
-**Type** : Optional
+**Syntax** : lsapi_with_connection_pool [on/off]
+**Example** : lsapi_with_connection_pool off;
+**Default** : on
+**Context** : main config
+**Type** : Optional
-**Description** :
-Enable/disable LSAPI connection pool mode.
+**Description** :
+Enable/disable LSAPI connection pool mode.
---
#### **lsapi_backend_max_idle**
-**Syntax** : lsapi_backend_max_idle [number]
-**Example** : lsapi_backend_max_idle 300;
-**Default** : 300
-**Context** : server config
-**Type** : Optional
+**Syntax** : lsapi_backend_max_idle [number]
+**Example** : lsapi_backend_max_idle 300;
+**Default** : 300
+**Context** : server config
+**Type** : Optional
-**Description** :
+**Description** :
It is relevant only with lsapi_with_connection_pool option switched on. Controls how long a worker process will wait for a new request before it exits. 0 stands for infinite. Should be more or equal to 0. In the case of a wrong format the default value will be used. Optional, default value is 300.
---
#### **lsapi_backend_max_reqs**
-**Synt-backendax**-1 : lsapi_backend_max_reqs [number] -backend
-**-1Example** : lsapi_backend_max_reqs 20000;
--backend**Default-1** : 10000
-**Context** : server config
-**Type** : Optional
+**Synt-backendax**-1 : lsapi_backend_max_reqs [number] -backend
+**-1Example** : lsapi_backend_max_reqs 20000;
+-backend**Default-1** : 10000
+**Context** : server config
+**Type** : Optional
-**Description** :
+**Description** :
It is relevant only with lsapi_with_connection_pool option switched on. Controls how many requests a worker process will process before it exits. Should be more than 0. In the case of a wrong format the default value will be used. Optional, default value is 10000.
---
-#### **lsapi_pool_size**
+#### **lsapi_pool_size**
-**Syntax** : lsapi_pool_size [number]
-**Example** : lsapi_pool_size 20;
-**Default** : 50
-**Context** : main config
-**Type** : Optional
+**Syntax** : lsapi_pool_size [number]
+**Example** : lsapi_pool_size 20;
+**Default** : 50
+**Context** : main config
+**Type** : Optional
-**Description** :
-The parameter sets the connection pool size for each virtual host.
+**Description** :
+The parameter sets the connection pool size for each virtual host.
---
#### **CRIU support**
-#### **lsapi_criu**
+#### **lsapi_criu**
-**Syntax** : lsapi_criu [on/off]
-**Example** : lsapi_criu on;
-**Default** : off
-**Context** : main config
-**Type** : Optional
+**Syntax** : lsapi_criu [on/off]
+**Example** : lsapi_criu on;
+**Default** : off
+**Context** : main config
+**Type** : Optional
-**Description** :
-Enable/disable CRIU for lsphp freezing. Default: Off.
+**Description** :
+Enable/disable CRIU for lsphp freezing. Default: Off.
---
-#### **lsapi_criu_socket_path**
+#### **lsapi_criu_socket_path**
-**Syntax** : lsapi_criu_socket_path [path]
-**Example** : lsapi_criu_socket_path /var/run/criu/criu_service.socket;
-**Default** : /var/run/criu/criu_service.socket
-**Context** : main config
-**Type** : Optional
+**Syntax** : lsapi_criu_socket_path [path]
+**Example** : lsapi_criu_socket_path /var/run/criu/criu_service.socket;
+**Default** : /var/run/criu/criu_service.socket
+**Context** : main config
+**Type** : Optional
-**Description** :
-Set path to socket for communication with criu service.
+**Description** :
+Set path to socket for communication with criu service.
---
-#### **lsapi_criu_imgs_dir_path**
+#### **lsapi_criu_imgs_dir_path**
-**Syntax** : lsapi_criu_imgs_dir_path [path]
-**Example** : lsapi_criu_imgs_dir_path /var/ngx_lsapi/criu;
-**Default** : /var/ngx_lsapi/criu
-**Context** : main config
-**Type** : Optional
+**Syntax** : lsapi_criu_imgs_dir_path [path]
+**Example** : lsapi_criu_imgs_dir_path /var/ngx_lsapi/criu;
+**Default** : /var/ngx_lsapi/criu
+**Context** : main config
+**Type** : Optional
-**Description** :
+**Description** :
Path to the folder where images of frozen PHP will be stored. Should be a path.
---
-#### **lsapi_criu_use_shm**
+#### **lsapi_criu_use_shm**
-**Syntax** : lsapi_criu_use_shm [off/signals]
-**Example** : lsapi_criu_use_shm signals;
-**Default** : off
-**Context** : main config
-**Type** : Optional
+**Syntax** : lsapi_criu_use_shm [off/signals]
+**Example** : lsapi_criu_use_shm signals;
+**Default** : off
+**Context** : main config
+**Type** : Optional
-**Description** :
+**Description** :
The method of request counting. Off - use shared memory. Signals - use signals from child processes to parents. Default: off
---
#### **lsapi_reset_criu_on_restart**
-**Syntax** : lsapi_reset_criu_on_restart [on/off]
-**Example** : lsapi_reset_criu_on_restart off;
-**Default** : off
-**Context** : main config
-**Type** : Optional
+**Syntax** : lsapi_reset_criu_on_restart [on/off]
+**Example** : lsapi_reset_criu_on_restart off;
+**Default** : off
+**Context** : main config
+**Type** : Optional
-**Description** :
-This option allows cleaning all CRIU images on NGINX restart.
+**Description** :
+This option allows cleaning all CRIU images on NGINX restart.
Setting lsapi_reset_criu_on_restart to on means that on each NGINX restart the CRIU images, which are stored in the directory specified by lsapi_criu_imgs_dir_path directive, will be recreated upon a new request to domain (only after restart).
----
#### **lsapi_criu_debug**
-**Syntax**: lsapi_criu_debug [on/off]
-**Example**: lsapi_criu_debug off;
-**Default** : off
-**Context** : main config
-**Type** : Optional
+**Syntax**: lsapi_criu_debug [on/off]
+**Example**: lsapi_criu_debug off;
+**Default** : off
+**Context** : main config
+**Type** : Optional
-**Description** :
+**Description** :
Enable/disable CRIU related debug logging.
---
-#### **lsapi_backend_initial_start**
+#### **lsapi_backend_initial_start**
-**Syntax** : lsapi_backend_initial_start [number]
-**Example** : lsapi_backend_initial_start 15;
-**Default** : 0
-**Context** : main config
-**Type** : Optional
+**Syntax** : lsapi_backend_initial_start [number]
+**Example** : lsapi_backend_initial_start 15;
+**Default** : 0
+**Context** : main config
+**Type** : Optional
-**Description** :
-Number of requests to virtualhost, when lsphp will be freezed. Default: 0 - means disable freezing.
+**Description** :
+Number of requests to virtualhost, when lsphp will be freezed. Default: 0 - means disable freezing.
---
@@ -8586,223 +8586,223 @@ Number of requests to virtualhost, when lsphp will be freezed. Default: 0 - mean
#### **lsapi_process_phpini**
-**Syntax** : lsapi_process_phpini [on/off]
-**Example** : lsapi_process_phpini on;
-**Default** : off
+**Syntax** : lsapi_process_phpini [on/off]
+**Example** : lsapi_process_phpini on;
+**Default** : off
**Context** : server config, location config
-**Type** : Optional
+**Type** : Optional
-**Description** :
+**Description** :
Enable or disable phpini_* directive processing. Default value is off.
---
-#### **lsapi_phpini**
+#### **lsapi_phpini**
-**Syntax** : lsapi_phpini [value]
-**Example**: lsapi_phpini /usr/home/lsapiuser/public_html/php.ini;
-**Default** : -
-**Context** : server config, location
-**Type** : Optional
+**Syntax** : lsapi_phpini [value]
+**Example**: lsapi_phpini /usr/home/lsapiuser/public_html/php.ini;
+**Default** : -
+**Context** : server config, location
+**Type** : Optional
-**Description** :
-Sets custom php.ini within server or location configuration. Absolute file path is required.
+**Description** :
+Sets custom php.ini within server or location configuration. Absolute file path is required.
When lsapi_process_phpini configuration directive is switched to Off, the value for the lsapi_phpini will be silently ignored.
---
-#### **lsapi_phprc**
-
-**Syntax** : lsapi_phprc [No | Env | Auto | DocRoot]
-**Example** : lsapi_phprc No;
-**Default** : No
-**Context** : server config
-**Type** : Optional
-
-**Description** :
-The value of PHPRC env variable.
-Special values are "No", "Env", "Auto" and "DocRoot".
-Default value is "No" - without PHPRC at all.
-The "Auto" value stands for php.ini from DocumentRoot of the corresponding VirtualHost if it is present, or from the user's home directory otherwise "DocRoot" value stands for php.ini from DocumentRoot of the corresponding VirtualHost.
-"Env" value for using PHPRC from the environment, to set it with SetEnv config option, for example:
-lsapi_phprc No;
-lsapi_phprc Auto;
-lsapi_phprc DocRoot;
-lsapi_phprc Env;
-lsapi_phprc /etc/;
+#### **lsapi_phprc**
+
+**Syntax** : lsapi_phprc [No | Env | Auto | DocRoot]
+**Example** : lsapi_phprc No;
+**Default** : No
+**Context** : server config
+**Type** : Optional
+
+**Description** :
+The value of PHPRC env variable.
+Special values are "No", "Env", "Auto" and "DocRoot".
+Default value is "No" - without PHPRC at all.
+The "Auto" value stands for php.ini from DocumentRoot of the corresponding VirtualHost if it is present, or from the user's home directory otherwise "DocRoot" value stands for php.ini from DocumentRoot of the corresponding VirtualHost.
+"Env" value for using PHPRC from the environment, to set it with SetEnv config option, for example:
+lsapi_phprc No;
+lsapi_phprc Auto;
+lsapi_phprc DocRoot;
+lsapi_phprc Env;
+lsapi_phprc /etc/;
---
-#### **lsapi_tmpdir**
+#### **lsapi_tmpdir**
-**Syntax** : lsapi_tmpdir [path]
-**Example** : lsapi_tmpdir /usr/tmp;
-**Default** : /tmp
-**Context** : server config
-**Type** : Optional
+**Syntax** : lsapi_tmpdir [path]
+**Example** : lsapi_tmpdir /usr/tmp;
+**Default** : /tmp
+**Context** : server config
+**Type** : Optional
-**Description** :
-Set an alternate request body temporary files directory.
+**Description** :
+Set an alternate request body temporary files directory.
---
#### **lsapi_enable_user_ini**
-**Syntax** : lsapi_enable_user_ini [on/off]
-**Example** : lsapi_enable_user_ini off;
-**Default** : off
-**Context** : server config
-**Type** : Optional
+**Syntax** : lsapi_enable_user_ini [on/off]
+**Example** : lsapi_enable_user_ini off;
+**Default** : off
+**Context** : server config
+**Type** : Optional
-**Description** :
+**Description** :
Enable .user.ini files for backend. Same as suphp, php-fpm and fcgid mechanism of .user.ini. Default value is off.
---
-#### **lsapi_user_ini_homedir**
+#### **lsapi_user_ini_homedir**
-**Syntax** : lsapi_user_ini_homedir [on/off]
-**Example** : lsapi_user_ini_homedir on;
-**Default** : off
-**Context** : server config
-**Type** : Optional
+**Syntax** : lsapi_user_ini_homedir [on/off]
+**Example** : lsapi_user_ini_homedir on;
+**Default** : off
+**Context** : server config
+**Type** : Optional
-**Description** :
+**Description** :
If the lsapi_enable_user_ini option is set to On, then enable/disable processing .user.ini file in the home directory also. The default value is Off.
---
#### **lsapi_mod_php_behaviour**
-**Syntax** : lsapi_mod_php_behaviour [on/off]
-**Example** : lsapi_mod_php_behaviour off;
-**Default** : on
-**Context** : server config, location config
-**Type** : Optional
+**Syntax** : lsapi_mod_php_behaviour [on/off]
+**Example** : lsapi_mod_php_behaviour off;
+**Default** : on
+**Context** : server config, location config
+**Type** : Optional
-**Description** :
+**Description** :
on/off - disable php_* directives, default On.
---
-#### **lsapi_param**
-
-**Syntax** : lsapi_param [var] [value]
-**Example**: lsapi_param PHP_ADMIN_VALUE "memory_limit=1024M";
-**Default** : -
-**Context** : server config, location config
-**Type** : Optional
-
-**Description** :
-Sets a parameter that should be passed to the LSPHP handler. The value can contain text, variables, and their combinations.
-Supported directives:
-PHP_ADMIN_VALUE
-PHP_VALUE
-PHP_ADMIN_FLAG
-PHP_FLAG
-Examples:
-lsapi_param PHP_ADMIN_VALUE "memory_limit=1024M \n max_execution_time=600";
-lsapi_param PHP_FLAG "display_startup_errors=on";
-lsapi_param PHP_ADMIN_FLAG "html_errors=on";
-lsapi_param PHP_VALUE "max_file_uploads=20";
-lsapi_param QUERY_STRING $query_string;
-lsapi_param REQUEST_METHOD $request_method;
-lsapi_param CONTENT_TYPE $content_type;
-lsapi_param CONTENT_LENGTH $content_length;
+#### **lsapi_param**
+
+**Syntax** : lsapi_param [var] [value]
+**Example**: lsapi_param PHP_ADMIN_VALUE "memory_limit=1024M";
+**Default** : -
+**Context** : server config, location config
+**Type** : Optional
+
+**Description** :
+Sets a parameter that should be passed to the LSPHP handler. The value can contain text, variables, and their combinations.
+Supported directives:
+PHP_ADMIN_VALUE
+PHP_VALUE
+PHP_ADMIN_FLAG
+PHP_FLAG
+Examples:
+lsapi_param PHP_ADMIN_VALUE "memory_limit=1024M \n max_execution_time=600";
+lsapi_param PHP_FLAG "display_startup_errors=on";
+lsapi_param PHP_ADMIN_FLAG "html_errors=on";
+lsapi_param PHP_VALUE "max_file_uploads=20";
+lsapi_param QUERY_STRING $query_string;
+lsapi_param REQUEST_METHOD $request_method;
+lsapi_param CONTENT_TYPE $content_type;
+lsapi_param CONTENT_LENGTH $content_length;
---
#### **Security**
-#### **lsapi_use_suexec**
+#### **lsapi_use_suexec**
-**Syntax** : lsapi_use_suexec [on/off]
-**Example** : lsapi_use_suexec on;
-**Default** : on
-**Context** : server config
-**Type** : Optional
+**Syntax** : lsapi_use_suexec [on/off]
+**Example** : lsapi_use_suexec on;
+**Default** : on
+**Context** : server config
+**Type** : Optional
-**Description** :
-Enable or disable suexec usage with a target user.
+**Description** :
+Enable or disable suexec usage with a target user.
---
-#### **lsapi_user**
+#### **lsapi_user**
-**Syntax** : lsapi_user [username] [group]
-**Example** : lsapi_user testlsapi testlsapi;
-**Default** : -
-**Context** : server config, local config
-**Type** : Mandatory
+**Syntax** : lsapi_user [username] [group]
+**Example** : lsapi_user testlsapi testlsapi;
+**Default** : -
+**Context** : server config, local config
+**Type** : Mandatory
-**Description** :
-Set user & group for requests.
-This parameter can take only one argument for username or two arguments for username and group.
+**Description** :
+Set user & group for requests.
+This parameter can take only one argument for username or two arguments for username and group.
---
-#### **lsapi_paranoid**
+#### **lsapi_paranoid**
-**Syntax** : lsapi_paranoid [on/off]
-**Example** : lsapi_paranoid on;
-**Default** : off
-**Context** : server config
-**Type** : Optional
+**Syntax** : lsapi_paranoid [on/off]
+**Example** : lsapi_paranoid on;
+**Default** : off
+**Context** : server config
+**Type** : Optional
-**Description** :
-Enable or disable permission checking for the target php scripts.
+**Description** :
+Enable or disable permission checking for the target php scripts.
---
-#### **lsapi_check_owner**
+#### **lsapi_check_owner**
-**Syntax** : lsapi_check_owner [on/off]
-**Example** : lsapi_check_owner on;
-**Default** : off
-**Context** : server config
-**Type** : Optional
+**Syntax** : lsapi_check_owner [on/off]
+**Example** : lsapi_check_owner on;
+**Default** : off
+**Context** : server config
+**Type** : Optional
-**Description** :
-Enable or disable checking the owner of the target PHP scripts.
+**Description** :
+Enable or disable checking the owner of the target PHP scripts.
---
-#### **lsapi_check_document_root**
+#### **lsapi_check_document_root**
-**Syntax** : lsapi_check_document_root [on/off]
-**Example** : lsapi_check_document_root on;
-**Default** : off
-**Context** : server config
-**Type** : Optional
+**Syntax** : lsapi_check_document_root [on/off]
+**Example** : lsapi_check_document_root on;
+**Default** : off
+**Context** : server config
+**Type** : Optional
-**Description** :
-Enable or disable checking the owner of DOCUMENT_ROOT.
+**Description** :
+Enable or disable checking the owner of DOCUMENT_ROOT.
---
-#### **lsapi_check_script**
+#### **lsapi_check_script**
-**Syntax** : lsapi_check_script [on/off]
-**Example** : lsapi_check_script on;
-**Default** : off
-**Context** : server config
-**Type** : Optional
+**Syntax** : lsapi_check_script [on/off]
+**Example** : lsapi_check_script on;
+**Default** : off
+**Context** : server config
+**Type** : Optional
-**Description** :
-Enable or disable checking the owner of target php scripts before sending the request to the lsphp backend. Optional, the default value is On.
+**Description** :
+Enable or disable checking the owner of target php scripts before sending the request to the lsphp backend. Optional, the default value is On.
---
-#### **lsapi_uid_gid**
+#### **lsapi_uid_gid**
-**Syntax** : lsapi_uid_gid [uid] [gid]
-**Example** : lsapi_uid_gid 1001 1001;
-**Default** : -
-**Context** : local config
-**Type** : Optional
+**Syntax** : lsapi_uid_gid [uid] [gid]
+**Example** : lsapi_uid_gid 1001 1001;
+**Default** : -
+**Context** : local config
+**Type** : Optional
-**Description** :
-Set user & group for requests.
+**Description** :
+Set user & group for requests.
---
@@ -8870,17 +8870,17 @@ The images of the processes will be saved even if NGINX is restarted. However, a
If php.ini or the configuration file from php.d is changed, the images must be deleted manually.
:::
-:::tip Note
-CRIU (version lower than criu-lve-3.6-1) can't correctly freeze
lsphp with
PrivateTmp enabled. For correct functionality,
PrivateTmp must be disabled in
nginx.service file .
+:::tip Note
+CRIU (version lower than criu-lve-3.6-1) can't correctly freeze
lsphp with
PrivateTmp enabled. For correct functionality,
PrivateTmp must be disabled in
nginx.service file .
:::
-To disable it, copy
_nginx.service_ to
_/etc/systemd/system_ and change there
PrivateTmp:
+To disable it, copy _nginx.service_ to _/etc/systemd/system_ and change there PrivateTmp:
```
-cat nginx.service
-............
+cat nginx.service
+............
[Unit]
Description=The nginx HTTP and reverse proxy server
@@ -8903,7 +8903,7 @@ PrivateTmp=false
WantedBy=multi-user.target
```
-Alternatively, it could be technically preferable to provide a small override of the service file, rather than copying the whole new version in /etc/systemd/system
+Alternatively, it could be technically preferable to provide a small override of the service file, rather than copying the whole new version in /etc/systemd/system
[http://www.freedesktop.org/software/systemd/man/systemd.unit.html](http://www.freedesktop.org/software/systemd/man/systemd.unit.html)
@@ -9010,7 +9010,7 @@ cd; touch mod_lsapi_reset_me_criu.test.com
```
This mode is enabled by default and creates a separate lsphp process for each virtual host.
@@ -9254,7 +9254,7 @@ mod_hostinglimist has variable for Apache CustomLog format string