Skip to content

Commit f9e3a80

Browse files
authored
Merge pull request #221 from ademeshko/patch-5
CLOS-3172: Describe mod_lsapi change in using different LVEid (CLOS-3…
2 parents fdae0df + ed4b2f7 commit f9e3a80

File tree

1 file changed

+58
-0
lines changed
  • docs/cloudlinuxos/cloudlinux_os_components

1 file changed

+58
-0
lines changed

docs/cloudlinuxos/cloudlinux_os_components/README.md

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6507,6 +6507,64 @@ In order to mod_lsapi PRO work lsapi.conf should be loaded to Apache through [In
65076507
For more detailed description of the module directives please visit [Configuration reference](./#configuration-references).
65086508
For installation guide mod_lsapi PRO please visit [Installation](./#installation-2).
65096509
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:
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+
65106568
#### Configuration references
65116569
65126570

0 commit comments

Comments
 (0)