cloudlinux php selector per domain?

Splet

Verified User
Joined
Oct 17, 2007
Messages
40
I thought the Cloudlinux PHP version can be switched per-domain, but when I select a new PHP version in "Select PHP Version" and click "set as current", it changes PHP version for all domains in the account.

Is there a GUI way to change it per domain?
 
you can use another selector, not cloudlinux, that will put needed keys to domain's htaccess.
 
By default, ClodLinux installs the php version for the entire account. They have an article on how to change the version for a domain through a file .htaccess:
<FilesMatch "\.(php4|php5|php3|php2|php|phtml)$">
SetHandler application/x-httpd-php72
</FilesMatch>
but this does not apply to all cms, i.e. there is a problem with modules for this version of php.
 
Thanks, I know of this way, but it's unfriendly for some more non-tech savvy users and they complain.

Does another selector already exists?
 
In my case handler looks like:
RemoveHandler .php
SetHandler application/x-lsphp72
 
Hello,
Depending on the handler used, these articles will be useful for you here
 
@skhristich yes, however our DA users expect to select one of their domains and any changes they make to be applied to only that domain.

At the moment they can change the PHP for all their domains, which is not always viable, edit the .htaccess files or to buy a reseller package and make one account per-domain (the best and most secure option but hassle and higher price so they usually don't go for it).

I'm tempted to make a DA plugin which will take out the hassle of editing the .htaccess files.
 
@skhristich yes, however our DA users expect to select one of their domains and any changes they make to be applied to only that domain.

At the moment they can change the PHP for all their domains, which is not always viable, edit the .htaccess files or to buy a reseller package and make one account per-domain (the best and most secure option but hassle and higher price so they usually don't go for it).

I'm tempted to make a DA plugin which will take out the hassle of editing the .htaccess files.
Hi,
Did you manage to create something like this?

I usually put a .htaccess file one directory higher then public_html.
So this .htaccess file doesn't interfere with the .htaccess file that comes with some applications.

So I put it in /home/username/domains/domain.be/.htaccess
In /home/username/domains/domain.be/public_html/.htaccess then there is the default .htaccess file of the application.

Both can coexist, and PhpSelector uses the php version for any subdirectories.

But if this would be configurable through the control panel itself it would be awesome :)
I don't think I have the knowledge nor the time to build this myself.

regards,
Stijn

Edit: found this thread: https://forum.directadmin.com/threads/directadmin-php-selector-and-cloudlinux-php-selector.62860/
 
Last edited:
Back
Top