virtualmin / virtualmin-nginx

Virtualmin plugin to allow use of nginx web server for virtual domain hosting
GNU General Public License v3.0
36 stars 13 forks source link

FPM menu link is incorrect #32

Closed iliajie closed 2 years ago

iliajie commented 2 years ago

Hello, Jamie!

As we discussed earlier in PM (remember the latest screencast) FPM menu link is incorrect when used with Nginx.

I tried CentOS 7 (where default PHP 5 is used + additional PHP 7.4 and 8.0) and Rocky 8 (where default is PHP 7.2 + additional PHP 5.6, 7.4 and 8.1).

Every time you change PHP version the menu link always leads to default /etc/php-fpm.d/00000000000.conf disregard of PHP version selected.

Selected PHP version, when switched from PHP Options page work just fine.

iliajie commented 2 years ago

I have taken a closer look at it myself, found a bug, and fixed it https://github.com/virtualmin/virtualmin-nginx/commit/c7e6e8bddddd8408f4b450f7b0286d63ab2e72d2.

Jamie, although, there are plenty of other places (4x) in virtual_feature.pl file, where virtual_server::get_php_fpm_config() used without $d -- could you double check please if that's expected!?

jcameron commented 2 years ago

If $d is passed in, it will return the config for the domain's current version. Otherwise it will return the first available FPM config. So it depends on the context ..

iliajie commented 2 years ago

Alright!

After running multiple tests on multiple systems I can say that almost everything is perfect!

There is only small tiny issue is that when PHP highest version selected on the template in FPM mode doesn't work.

iliajie commented 2 years ago

Oh, okay. It looks like Virtualmin bug, not Nginx module.

I think we're good to go then with a new release.

iliajie commented 2 years ago

@jcameron Jamie, have a look at this patch. It will fix it for both Apache and Nginx.

Fix to correctly pick highest available version in FPM mode - https://github.com/virtualmin/virtualmin-gpl/commit/7353ab4f720137712f39f8e62be1ef78ecd8c878