User Tools

Site Tools


cagefs:php-per-directory

Cloudlinux PHP per directory

More info: https://www.cloudlinux.com/cloudlinux-os-blog/entry/different-php-versions-per-directories-using-mod-lsapi

I assume, that on DA is used lsphp handler by default.

1) Create /etc/container/php.handler with this:

application/x-lsphp52 /opt/alt/php52/usr/bin/lsphp
application/x-lsphp53 /opt/alt/php53/usr/bin/lsphp
application/x-lsphp54 /opt/alt/php54/usr/bin/lsphp
application/x-lsphp55 /opt/alt/php55/usr/bin/lsphp

2) Restart apache

3) In location where You need to use specific php create .htaccess with:

AddType application/x-lsphp53 .php5 .php4 .php .php3 .php2 .phtml
cagefs/php-per-directory.txt · Last modified: 2018/06/27 10:05 by dreiggy

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki