Set PHP FPM Version per Directory

rch7

Member
Sep 25, 2017
13
1
3
North America
cPanel Access Level
Root Administrator
Hello,

How can I set different PHP FPM version in directory for .php files?
It works for .html files if I add to .htaccess:
AddType application/x-httpd-ea-php56 .php .html

But .php files are still served as php 7, that is domain wide setting.
The directory isn't separate subdomain on its own.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,904
2,218
463
Hello @rch7

You can only configure PHP-FPM on a per-domain basis. If you need to configure a specific directory to use PHP-FPM with a different PHP version, then you'd need to setup a subdomain or addon domain with the document root associated with the specific directory. Once you do that, you can assign a specific PHP version to that subdomain or addon domain using WHM >> MultiPHP Manager or cPanel >> MultiPHP Manager.

Thank you.