Skip to content

Commit 3345bff

Browse files
authored
CLOS-3172: Describe mod_lsapi change in using different LVEid (CLOS-3136)
1 parent c5ac4fd commit 3345bff

1 file changed

Lines changed: 59 additions & 0 deletions

File tree

  • docs/cloudlinuxos/cloudlinux_os_components

docs/cloudlinuxos/cloudlinux_os_components/README.md

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6506,6 +6506,65 @@ In order to mod_lsapi PRO work lsapi.conf should be loaded to Apache through [In
65066506
For more detailed description of the module directives please visit [Configuration reference](./#configuration-references).
65076507
For installation guide mod_lsapi PRO please visit [Installation](./#installation-2).
65086508
6509+
#### Using alternative LVE id for Virtual Hosts
6510+
Starting from 1.1-79 version mod_lsapi supports possibility to use alternative LVE id for different Virtual Hosts.
6511+
XXXX
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:
6513+
```
6514+
[root@ ~]# id user1
6515+
uid=1001(user1) gid=1004(user1) groups=1004(user1)
6516+
[root ~]# lvectl list
6517+
ID SPEED PMEM VMEM EP NPROC IO IOPS
6518+
default 100 1024M 0K 20 100 1024 1024
6519+
1001 50 1024M 0K 40 90 1024 1024
6520+
limit 0 0K 0K 0 0 0 0
6521+
6522+
[root@ ~]#
6523+
```
6524+
6525+
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+
<IfModule hostinglimits_module>
6541+
<Directory "/home/user1/public_html">
6542+
LVEId 11001
6543+
</Directory>
6544+
</IfModule>
6545+
<IfModule lsapi_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+
<IfModule hostinglimits_module>
6555+
<Directory "/home/user1/sub.user1.example.com">
6556+
LVEId 1001
6557+
</Directory>
6558+
</IfModule>
6559+
<IfModule lsapi_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.
6567+
65096568
#### Configuration references
65106569
65116570

0 commit comments

Comments
 (0)