[Feature Request]LSPHP pool/php.ini per vhost

#1
Hello,

We are looking to replace apache with litespeed. Now we are in testing litespeed for compatibility with our setup.
Unfortunately we face some incompatibility which I think will not be very hard to be implemented.

First let me explain our setup:
CP: virtualmin (with little modifications in the code!)
Every account have premade structure for the main and additional domains (default for virtualmin working by default with apache +fcgid) and every website have it's own php.ini file
Structure is the following:
Code:
/home/user/
                    \_public_html(for main domain)
                    \_etc/php.ini
                    \_domains
                                     \_domain1.tld/
                                                           \_etc/php.ini
                                                           \_public_html
                                     \_domain2.tld/
                                                           \_etc/php.ini
                                                           \_public_html
Apache 2.4 with mod_lsapi (CL module - but without cloudlinux installed slightly modified)
It is set up with one parent lsphp process per domain with limited max number of lsphp to fork and accepting per vhost SetEnv PHPRC /home/user/etc/php.ini (for main domain vhosts) and /home/user/domains/domain1.tld/etc/php.ini (for every additional website).
That way every domain have it's own php.ini/opcache and we do not need to set different opcache limit for different plans but set it for a website. Otherwise setting too high or to low the opcache memory limit will be unfair!
Also this php.ini is loaded after all default *.ini files. That way users are limited enough of the changes they can make in their php.ini files.

Changing PHP version per website is done by virtualmin changing the handler in the domains vhost.

As I see the most close to our setup is ProcessGroup Mode with one exception it use one parent lsphp for user(account) which interfere with our setup on three places
- custom php.ini for every website
- opcache limits for every website
- process limits for a website

The only difference I can see in our setup and the ProcessGroup mode of litespeed is the name of the socket file.
litespeed in process group mode - APVH_{username}_Suphp{phpversion number}.sock
our setup - lsapi_{handler}_UID_domain.tld.sock example lsapi_application-x-lsphp7.3_3521_domain-name.tld.sock

It will be great if we have an option to choose to have it like it is now or parent lsphp process per website!
 
Last edited:

Pong

Administrator
Staff member
#2
Thank you for your suggestion. you can see each LSWS process group will be based on user account, not by each individual domains.

This is a universal to most of the common control panel including cpanel/plesk/directadmin etc.

You can use per user based php.ini https://www.litespeedtech.com/support/wiki/doku.php/litespeed_wiki:php:per-user-php-ini

Virtualmin maybe consider making it identical to the rest of control panel world.
 
#3
Thank you for your answer. The issue is with the current customers that have different php settings! Also setting the same OPcache settings per account with 5 websites package and a 35 websites (for example) will be a big compromise.
One of the reasons for choosing Virtualmin was because every website is on it's own and can't for example fill all the processes and stop the other, also setting the opcache memory is way more predictable and can be be more precise.

And as I said the change will be only in the socket name. We need just the ability to select with variables to be included in the socket name.
IN the current implementation maybe we can set it up the way we want but the variable $VH_NAME is empty when we use it in External app tab in the socket name. I do not know if this is intended to be that way or it is a bug but if ties our hands.

We do not want to LSWS to change some fundamental setting just an option which will make it more flexible to match users/clients needs!
 
#4
So LSWS do not need want to be flexible but to work on paid control panels.
Because Cpanel choosed to make the file structure of the accounts a mess every other panel should be a mess too?
We need to isolate every website from each other and still be in one account. Isolation like openbasedir for every vhost isn't possible if the lsphp pool is for user!
Just make it possible to choose if the pool is for a user or for a vhost like Cloudlinux have done in their mod_lsapi for apache!
 
Top