You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/cloudlinuxos/cloudlinux_os_components/README.md
+58Lines changed: 58 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6507,6 +6507,64 @@ In order to mod_lsapi PRO work lsapi.conf should be loaded to Apache through [In
6507
6507
For more detailed description of the module directives please visit [Configuration reference](./#configuration-references).
6508
6508
For installation guide mod_lsapi PRO please visit [Installation](./#installation-2).
6509
6509
6510
+
#### Using alternative LVE id for Virtual Hosts
6511
+
Starting from 1.1-79 version mod_lsapi supports possibility to use alternative LVE id for different Virtual Hosts.
6512
+
While the main LVE for user account is created automatically on account creation, alternative LVEs must be created manually using lvectl CLI utility. For example, if we already created user1 user account, LVE with the same LVE id as account uid is already created:
Let's use 11001 LVE id for alternative LVE for this account, create this LVE and set LVE limits for it:
6526
+
```
6527
+
[root ~]# lvectl set 11001 --speed=50% --pmem=512M --io=2048 --ep=10 --nproc=50
6528
+
[root ~]# lvectl limits 11001
6529
+
ID SPEED PMEM VMEM EP NPROC IO IOPS
6530
+
11001 50 512M 0K 10 50 2048 1024
6531
+
6532
+
[root ~]#
6533
+
```
6534
+
6535
+
Now we can use different LVEs for different Virtual Hosts bound to the same user account user1 by setting different [LVEid](./#lveid) values:
6536
+
```
6537
+
<VirtualHost 10.193.208.48:80>
6538
+
ServerName user1.example.com
6539
+
DocumentRoot /home/user1/public_html
6540
+
<IfModulehostinglimits_module>
6541
+
<Directory "/home/user1/public_html">
6542
+
LVEId 11001
6543
+
</Directory>
6544
+
</IfModule>
6545
+
<IfModulelsapi_module>
6546
+
lsapi_user_group user1 user1
6547
+
lsapi_per_user Off
6548
+
</IfModule>
6549
+
</VirtualHost>
6550
+
6551
+
<VirtualHost 10.193.208.48:80>
6552
+
ServerName sub.user1.example.com
6553
+
DocumentRoot /home/user1/sub.user1.example.com
6554
+
<IfModulehostinglimits_module>
6555
+
<Directory "/home/user1/sub.user1.example.com">
6556
+
LVEId 1001
6557
+
</Directory>
6558
+
</IfModule>
6559
+
<IfModulelsapi_module>
6560
+
lsapi_user_group user1 user1
6561
+
lsapi_per_user Off
6562
+
</IfModule>
6563
+
</VirtualHost>
6564
+
```
6565
+
6566
+
Please note that in the example above 2 different Virtual Hosts use different LVEs but the same account user1. Also [lsapi_per_user](./#lsapi-per-user) config directive must be set to Off in order to allow using of dedicated lsphp backend for every Virtual Host.
0 commit comments