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 Tech Corner

How to Create an Amazon ECS Cluster? 

  • May 25, 2022 .
  • 5 min min
Read More
  • By admin
  • in Tech Corner

Features and Operations of Amazon EBS (Elastic Block Store)

  • Apr 21, 2022 .
  • 5 min min
Read More

Be in the know

Techno tips served hot! Subscribe now and stay atop.