Ubuntu Linux 20.04.2 Webmin version 1.962 Virtualmin version 6.14
Hi,
To get HTTP2 running I needed php-fpm. I installed everything and HTTP2 is up an running.
No Problems so far.
I created a Virtual Server (Website Options > [PHP script execution mode] is FCGId ).
and created a pool for it in /etc/php/7.4/fpm/pool.d/myserver.conf with these mods.
user = myserver
group = myserver
listen.owner = myserver
listen.group = myserver
php_admin_value[upload_max_filesize] = 256M
php_admin_value[max_input_vars] = 5000
The problem is that phpinfo() does not recognize custom variable values I set up.
Also trying to run phpmyadmin which is complaining about the tmp directory âis not accessible. phpMyAdmin is not able to cache templates and will be slow because of this.â
I then switched to FPM (run as virtual server owner) and phpmyadmin stopped complaining and it managed to create its tmp folder and files.
Also, in /etc/php/7.4/fpm/pool.d/ I now have a new conf file 1615214450510799.conf !!!
When I append my variables to this file, then phpinfo() recognizes them.
php_admin_value[upload_max_filesize] = 256M
php_admin_value[max_input_vars] = 5000
Question #1:
Did I leave anything out or have I done everything ok?
Question #2:
Why 1615214450510799.conf and not myserver.conf? Why when I switch back to FCGId this file is deleted?
Question #3:
Can FCGId also be configured similarly? What should I name the conf file? Is there any benefit running FCGId instead of FPM mode?
For each virtual server (i.e. domain) that you create in Virtualmin, and for which you select PHP-FPM as execution method, there will be a config file created with a name of the kind you have listed.
This gives you the ability to configure PHP-FPM for each domain seperately, a very powerful feature which I recently used to host hundreds of WordPress websites on a Virtualmin server which has relatively modest specs.
Why the seemingly random numbers as name of the config file, rather than the domain name? Only the Virtualmin Gods would know the answer to that.,
First off, you donât create the âpoolâ file manually, this is created by Virtualmin automatically for you with the most appropriate settings.
Refer to the previous statement.
The number in the filename is the âdomain IDâ generated by Virtualmin and allows Virtualmin to find the appropriate configuration file when making edits via the GUI or CLI. The file is deleted when you switch between execution modes as FCGId does NOT use configurations that are specific to PHP-FPM.
FPM stands for âFastCGI Process Managerâ which is a newer implementation of the FCGId protocol and is recommended for usage over the older FCGId mode in most cases.
If you require further assistance or would like to go over anything you donât understand, you may reach out to me to setup a screen sharing session to discuss and/or address things.
Joe has often commented here that PHP-FPM should be used in preference over other options. Sometimes the comment is in the context of better security of the shared hosting environment, sometimes in context of performance and support at the OS level (e.g. CentOS 8).
Youâre making this more complicated than it needs to be. Virtualmin can create the configuration for you.
I donât know of any reason to prefer FCGId at this point. You donât name the conf files, Virtualmin does.
FCGId may be necessary, for now, if youâre using multiple PHP versions, but I donât recommend doing that either, generally speaking. And, thatâs not really a technical thing, just an implementation detail in VirtualminâŠpretty soon Virtualmin will be able to do multiple PHP versions with PHP-FPM (though again, I would discourage folks from doing so unless absolutely necessary).