From 685d406322539ec9e524da2a4c6e674ca6653027 Mon Sep 17 00:00:00 2001 From: Ilia Date: Thu, 9 Jun 2022 22:39:51 +0300 Subject: [PATCH 1/7] Do not display PHP which cannot be edited https://github.com/virtualmin/virtualmin-gpl/commit/2ca22342e7742fe1215eecc352c671ad82e7e7ac --- virtual_feature.pl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/virtual_feature.pl b/virtual_feature.pl index e421d33..9d9fdf0 100644 --- a/virtual_feature.pl +++ b/virtual_feature.pl @@ -1077,6 +1077,7 @@ sub feature_links my $mode = &feature_get_web_php_mode($d); if ($mode eq "fcgid") { # Link to edit per-version php.ini files + my @dirs = &virtual_server::list_domain_php_directories($d); foreach my $ini (&virtual_server::find_domain_php_ini_files($d)) { push(@rv, { 'mod' => 'phpini', 'desc' => $ini->[0] ? @@ -1085,7 +1086,7 @@ sub feature_links 'page' => 'list_ini.cgi?file='. &urlize($ini->[1]), 'cat' => 'services', - }); + }) if ($dirs[0]->{'version'} == $ini->[0]); } } elsif ($mode eq "fpm") { From 4aacf3e49da5b555bc72329dffa18f5c1edba393 Mon Sep 17 00:00:00 2001 From: Ilia Date: Sat, 11 Jun 2022 00:20:24 +0300 Subject: [PATCH 2/7] Fix AlmaLinux config --- config-AlmaLinux-Linux-6.0-ALL => config-AlmaLinux-7.0-ALL | 0 config-Rocky-Linux-6.0-ALL => config-Rocky-Linux-7.0-ALL | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename config-AlmaLinux-Linux-6.0-ALL => config-AlmaLinux-7.0-ALL (100%) rename config-Rocky-Linux-6.0-ALL => config-Rocky-Linux-7.0-ALL (100%) diff --git a/config-AlmaLinux-Linux-6.0-ALL b/config-AlmaLinux-7.0-ALL similarity index 100% rename from config-AlmaLinux-Linux-6.0-ALL rename to config-AlmaLinux-7.0-ALL diff --git a/config-Rocky-Linux-6.0-ALL b/config-Rocky-Linux-7.0-ALL similarity index 100% rename from config-Rocky-Linux-6.0-ALL rename to config-Rocky-Linux-7.0-ALL From c7e6e8bddddd8408f4b450f7b0286d63ab2e72d2 Mon Sep 17 00:00:00 2001 From: Ilia Date: Sat, 11 Jun 2022 00:39:05 +0300 Subject: [PATCH 3/7] Fix PHP-FPM menu link #32 --- virtual_feature.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/virtual_feature.pl b/virtual_feature.pl index 9d9fdf0..ad5485a 100644 --- a/virtual_feature.pl +++ b/virtual_feature.pl @@ -1091,7 +1091,7 @@ sub feature_links } elsif ($mode eq "fpm") { # Link to edit FPM configs with PHP settings - my $conf = &virtual_server::get_php_fpm_config(); + my $conf = &virtual_server::get_php_fpm_config($d); if ($conf) { my $file = $conf->{'dir'}."/".$d->{'id'}.".conf"; push(@rv, { 'mod' => 'phpini', From cd8946234d411969e2cd6ae284d359688ce98e16 Mon Sep 17 00:00:00 2001 From: Ilia Date: Mon, 13 Jun 2022 23:32:01 +0300 Subject: [PATCH 4/7] 2.26 --- module.info | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module.info b/module.info index eba7715..9de5bc7 100644 --- a/module.info +++ b/module.info @@ -1,4 +1,4 @@ desc=Nginx Webserver category=servers -version=2.25 +version=2.26 readonly=1 From 11e83d900c3197cd9ee7a4d24402f407fb553752 Mon Sep 17 00:00:00 2001 From: iliajie Date: Thu, 21 Jul 2022 15:29:17 +0300 Subject: [PATCH 5/7] Fix more configs for contemporary distros --- config-CentOS-Stream-Linux-8.0-ALL | 9 +++++++++ config-Redhat-Enterprise-Linux-7.0-ALL | 6 +++--- config-debian-linux-10.0-ALL | 11 +++++++++++ config-redhat-linux | 6 +++--- 4 files changed, 26 insertions(+), 6 deletions(-) create mode 100644 config-CentOS-Stream-Linux-8.0-ALL create mode 100644 config-debian-linux-10.0-ALL diff --git a/config-CentOS-Stream-Linux-8.0-ALL b/config-CentOS-Stream-Linux-8.0-ALL new file mode 100644 index 0000000..e4e8505 --- /dev/null +++ b/config-CentOS-Stream-Linux-8.0-ALL @@ -0,0 +1,9 @@ +nginx_config=/etc/nginx/nginx.conf +nginx_cmd=/usr/sbin/nginx +start_cmd=systemctl start nginx +stop_cmd=systemctl stop nginx +apply_cmd=systemctl restart nginx +child_procs=4 +php_socket=1 +listen_mode=1 +proxy_websockets=0 diff --git a/config-Redhat-Enterprise-Linux-7.0-ALL b/config-Redhat-Enterprise-Linux-7.0-ALL index 142f157..e4e8505 100644 --- a/config-Redhat-Enterprise-Linux-7.0-ALL +++ b/config-Redhat-Enterprise-Linux-7.0-ALL @@ -1,8 +1,8 @@ nginx_config=/etc/nginx/nginx.conf nginx_cmd=/usr/sbin/nginx -start_cmd=service nginx start -stop_cmd=service nginx stop -apply_cmd=service nginx restart +start_cmd=systemctl start nginx +stop_cmd=systemctl stop nginx +apply_cmd=systemctl restart nginx child_procs=4 php_socket=1 listen_mode=1 diff --git a/config-debian-linux-10.0-ALL b/config-debian-linux-10.0-ALL new file mode 100644 index 0000000..c72da22 --- /dev/null +++ b/config-debian-linux-10.0-ALL @@ -0,0 +1,11 @@ +nginx_config=/etc/nginx/nginx.conf +nginx_cmd=/usr/sbin/nginx +start_cmd=systemctl start nginx +stop_cmd=systemctl stop nginx +apply_cmd=systemctl restart nginx +add_to=/etc/nginx/sites-available +add_link=/etc/nginx/sites-enabled +child_procs=4 +php_socket=1 +listen_mode=1 +proxy_websockets=0 diff --git a/config-redhat-linux b/config-redhat-linux index 500ea03..e4e8505 100644 --- a/config-redhat-linux +++ b/config-redhat-linux @@ -1,8 +1,8 @@ nginx_config=/etc/nginx/nginx.conf nginx_cmd=/usr/sbin/nginx -start_cmd=/etc/init.d/nginx start -stop_cmd=/etc/init.d/nginx stop -apply_cmd=/etc/init.d/nginx restart +start_cmd=systemctl start nginx +stop_cmd=systemctl stop nginx +apply_cmd=systemctl restart nginx child_procs=4 php_socket=1 listen_mode=1 From fca7001e09eb83ca3ddf3d96864ff3e2f5d3ff63 Mon Sep 17 00:00:00 2001 From: iliajie Date: Thu, 4 Aug 2022 17:28:14 +0300 Subject: [PATCH 6/7] Fix not to wrap Nginx variables https://forum.virtualmin.com/t/new-virtualmin-nginx-update-returns-invalid-condition-scheme-error/116281 --- virtualmin-nginx-lib.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/virtualmin-nginx-lib.pl b/virtualmin-nginx-lib.pl index 273c8c3..13123be 100644 --- a/virtualmin-nginx-lib.pl +++ b/virtualmin-nginx-lib.pl @@ -467,10 +467,10 @@ sub join_words if ($w eq "") { push(@rv, '""'); } - elsif ($w =~ /\s|;|\$/ && $w !~ /"/) { + elsif ($w =~ /\s|;|\$/ && $w !~ /"/ && $w !~ /^\$/) { push(@rv, "\"$w\""); } - elsif ($w =~ /\s|;|\$/) { + elsif ($w =~ /\s|;|\$/ && $w !~ /^\$/) { push(@rv, "'$w'"); } else { From a75d854f50cb4a954f1dcf0c393f8f5d73863949 Mon Sep 17 00:00:00 2001 From: iliajie Date: Sat, 6 Aug 2022 11:25:03 +0300 Subject: [PATCH 7/7] Fix configs (Debian/Ubuntu, Oracle) --- config-Oracle-Linux-8.0-ALL | 9 +++++++++ config-Ubuntu-Linux-18.04-ALL | 11 +++++++++++ config-debian-linux | 6 +++--- 3 files changed, 23 insertions(+), 3 deletions(-) create mode 100644 config-Oracle-Linux-8.0-ALL create mode 100644 config-Ubuntu-Linux-18.04-ALL diff --git a/config-Oracle-Linux-8.0-ALL b/config-Oracle-Linux-8.0-ALL new file mode 100644 index 0000000..e4e8505 --- /dev/null +++ b/config-Oracle-Linux-8.0-ALL @@ -0,0 +1,9 @@ +nginx_config=/etc/nginx/nginx.conf +nginx_cmd=/usr/sbin/nginx +start_cmd=systemctl start nginx +stop_cmd=systemctl stop nginx +apply_cmd=systemctl restart nginx +child_procs=4 +php_socket=1 +listen_mode=1 +proxy_websockets=0 diff --git a/config-Ubuntu-Linux-18.04-ALL b/config-Ubuntu-Linux-18.04-ALL new file mode 100644 index 0000000..c72da22 --- /dev/null +++ b/config-Ubuntu-Linux-18.04-ALL @@ -0,0 +1,11 @@ +nginx_config=/etc/nginx/nginx.conf +nginx_cmd=/usr/sbin/nginx +start_cmd=systemctl start nginx +stop_cmd=systemctl stop nginx +apply_cmd=systemctl restart nginx +add_to=/etc/nginx/sites-available +add_link=/etc/nginx/sites-enabled +child_procs=4 +php_socket=1 +listen_mode=1 +proxy_websockets=0 diff --git a/config-debian-linux b/config-debian-linux index 6bf368b..c72da22 100644 --- a/config-debian-linux +++ b/config-debian-linux @@ -1,8 +1,8 @@ nginx_config=/etc/nginx/nginx.conf nginx_cmd=/usr/sbin/nginx -start_cmd=service nginx start -stop_cmd=service nginx stop -apply_cmd=service nginx restart +start_cmd=systemctl start nginx +stop_cmd=systemctl stop nginx +apply_cmd=systemctl restart nginx add_to=/etc/nginx/sites-available add_link=/etc/nginx/sites-enabled child_procs=4