New Template model or how do i specify php memory limit for each hosting seperately

I really appreciate the new dynamic approach.
for example
i have magento2 template and could use pretty good preinstalled magento template you did
the shop is running and php version is set via backend template php7_3 in my case

as fas as i could see when we install php-fpm 7.4 then a new template is made php7_4
but it does not differ from php7_3…
php version is set via filename?
i wanted to have some “extra” php7_3-M2 for magento but then always php 7.4 is used - not good for me
another try led mit to set everything back to standard
i wanted to set the php limit via separate template magento-ML2048 for example
i used

fastcgi_param PHP_FLAG “session.auto_start=off \n suhosin.session.cryptua=off”;
fastcgi_param PHP_VALUE “memory_limit=2048M \n max_execution_time=18000”;

from magento sample nginx
but this didnt help

is there any other recommendation?
for the moment all of my php versions have 2048M but it seems a bit high for most wordpress sites :slight_smile:

what is your recommendation how would you do this?

Templates location:

  1. Nginx Standalone with php-fpm backend (or multiphp):

  2. Nginx as proxy for apache2

  3. Apache with php-fpm backend or multiphp:

  4. Apache with built-in php:

  5. php-fpm or multiphp templates:


I faced something similar today and I would like to add my findings to this discussion.

First of all, I’m using nginx as a reverse proxy and apache with multi-php. I need to have some special php settings at one of the sites, so I made a copy of the PHP-5_6.tpl and named it PHP-5_6-OC.tpl. But that didn’t work. Then I tried to name it PHP-5_6_OC.tpl but that didn’t work either. Then I opened up the file func/ to check the code.

If I’m not mistaken, the following code checks the template filename to decide on the php version to use: $backend_template =~ ^.*PHP-([0-9])\_([0-9])$

So, in order for the template to work, the template filename must be named like whateverPHP-x_x.tpl (where x_x the php version).

Syntax is