Knowledgebase

How to Setup PHP Selector on Plesk with mod_lsapi

Setting up PHP Selector on Plesk with mod_lsapi allows you to offer multiple PHP versions to your users. Here's a step-by-step guide to help you do this:

Note: Before you proceed, make sure you have mod_lsapi installed and enabled on your Plesk server.

  1. Access Plesk Control Panel:

    Log in to your Plesk control panel.

  2. Enable PHP Selector:

    • Navigate to "Tools & Settings" in the Plesk interface.
    • Under the "Security" section, click on "ModSecurity".
    • In the ModSecurity settings, find the "Switch off security rules management" option and make sure it's set to "Off".
    • Click on "Apply" to save the changes.
  3. Install PHP Versions:

    • Go back to the main Plesk dashboard.
    • Click on "Tools & Settings" again.
    • Under "Updates and Upgrades", navigate to "Add/Remove Components".
    • Scroll down and select the PHP versions you want to install. Make sure to select both the PHP version and the corresponding PHP handler.
    • Click "Continue" to proceed with the installation.
  4. Set Default PHP Version:

    • Once the PHP versions are installed, navigate to "Domains" in Plesk.
    • Find the domain you want to configure and click on it.
    • In the domain settings, go to the "PHP Settings" section.
    • Choose the default PHP version from the dropdown menu and select the desired PHP handler (mod_lsapi).
    • Click "OK" to save the changes.
  5. Enable PHP Selector for Domains:

    • In the domain settings, scroll down to the "Web scripting and statistics" section.
    • Find the option "PHP support (PHP Selector)" and select "Run PHP as FastCGI application served by Apache".
    • Click "OK" to save the changes.
  6. Configure PHP Selector (If Necessary):

    • If you need to customize PHP settings for specific domains or users, you can do so in the "PHP Selector" section of the domain settings.
  7. Verify PHP Selector Configuration:

    • Create a simple PHP file with the following content:

      php
    • <?php phpinfo(); ?>
    • Upload it to your domain's document root.

    • Access the file through a web browser. You should see the PHP information page, which will display the selected PHP version.

That's it! You have now set up PHP Selector with mod_lsapi on your Plesk server. Users can select their preferred PHP versions through the Plesk interface.

Remember to communicate with your users and provide them with instructions on how to select their desired PHP version for their domains.

 
 
 
  • 0 Users Found This Useful
Was this answer helpful?