VM GPL, it came with PHP 7.2 on centOS 8, today I installed PHP 7.4 using this Multiple PHP Versions | Virtualmin .
(Have done multiple time in past with other servers) Everything went fine. Rechecked Virtualmin configuration, it showed new php and added missing php.ini file for me. Switched to new PHP version for a domain and it was working.
However, to verify, I created a phpinfo() file, uploaded it.
Now interesting thing is happening, on each request I am seeing alternate version of PHP, some its showing 7.2 and then next load, 7.4 . I tried multiple refresh and each time PHP version is not same.
Other than that, since its LEMP, I needed few directives changed in php-fpm, so I copied from PHP 7.2 php-fpm data to PHP 7.4 for that domain. (initially PHP 7.4 fpm file was empty)
Example : /etc/php-fpm.d/159385722838518.conf
I assume Ilia is suggesting you’re seeing two different virtual servers (both of which happen to have phpinfo on the same path), because DNS is serving different IPs. That wouldn’t be my first guess, but I guess it could happen.
But, I honestly don’t know how it could switch on each request. There’s no mechanism for that to happen within the same domain. I mean, it’s hard-coded proxy config in nginx, and connecting to a long-running FPM server. Nothing in that changes on each request, so I have no idea how you’re getting different ones on alternating request.