Requisites: mod_lsapi, PHP Selector and CageFS

Follow the steps below:
Enable liblsapi for the domain

/usr/bin/switch_mod_lsapi --enable-domain domain.com
Create the file /etc/container/php.handler with handlers corresponding to each PHP version and restart Apache webserver.
For example, the commands for PHP versions 5.4 & 5.5 will be:
application/x-lsphp54 /opt/alt/php54/usr/bin/lsphp (For Version 5.4)
application/x-lsphp55 /opt/alt/php55/usr/bin/lsphp (For Version 5.5)
Now we can add the required PHP version’s handler entry in the Directory’s .htaccess
AddType application/x-lsphp54 .php
Note: Subdirectories use the same PHP version as that of parent directory. To use native PHP, remove AddType entry from .htaccess and lsapi will not look up for custom PHP version.

Get new insights right to your inbox

How can our experts help you?

Schedule your consultation

You may also like

  • By admin
  • in DevOps

DevOps as a Service: All You Should Know

  • Aug 9, 2022 .
  • 9 min min
Read More
  • By admin
  • in Containerization

Containerization VS Virtualization: Understanding the Differences

  • Aug 4, 2022 .
  • 8 min min
Read More
  • By admin
  • in DevOps

Best DevOps Tools You Must Try in 2022

  • Jul 26, 2022 .
  • 12 min min
Read More

Be in the know

Techno tips served hot! Subscribe now and stay atop.