From d422f0804ba104c1fd6758965aebc159613c8592 Mon Sep 17 00:00:00 2001 From: Ilia Ross Date: Fri, 18 Aug 2023 16:06:13 +0300 Subject: [PATCH 1/7] Fix to also consider default PHP mode passed in domain level https://github.com/virtualmin/virtualmin-gpl/pull/615 --- virtual_feature.pl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/virtual_feature.pl b/virtual_feature.pl index 037545e..5b455fb 100644 --- a/virtual_feature.pl +++ b/virtual_feature.pl @@ -243,7 +243,8 @@ sub feature_setup &$virtual_server::second_print($virtual_server::text{'setup_done'}); # Set up fcgid or FPM server - my $mode = &virtual_server::template_to_php_mode($tmpl); + my $mode = $d->{'default_php_mode'} || &virtual_server::template_to_php_mode($tmpl); + delete($d->{'default_php_mode'}); &$virtual_server::first_print($text{'feat_php'.$mode}); # Create initial config block for running PHP scripts. The port gets From d7232224b7c4cd859be353ed5e87a05cfea0e03b Mon Sep 17 00:00:00 2001 From: Ilia Ross Date: Fri, 18 Aug 2023 16:11:19 +0300 Subject: [PATCH 2/7] Reload Nginx gracefully [more] https://github.com/virtualmin/virtualmin-gpl/issues/613 --- config-AlmaLinux-7.0-ALL | 2 +- config-CentOS-Linux-7.0-ALL | 2 +- config-CentOS-Stream-Linux-8.0-ALL | 2 +- config-Oracle-Linux-8.0-ALL | 2 +- config-Redhat-Enterprise-Linux-7.0-ALL | 2 +- config-Rocky-Linux-7.0-ALL | 2 +- config-debian-linux | 2 +- config-debian-linux-10.0-ALL | 2 +- config-redhat-linux | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/config-AlmaLinux-7.0-ALL b/config-AlmaLinux-7.0-ALL index 8bd4f03..bc7a036 100644 --- a/config-AlmaLinux-7.0-ALL +++ b/config-AlmaLinux-7.0-ALL @@ -2,7 +2,7 @@ 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 +apply_cmd=systemctl reload nginx child_procs=4 php_socket=1 listen_mode=1 diff --git a/config-CentOS-Linux-7.0-ALL b/config-CentOS-Linux-7.0-ALL index 8bd4f03..bc7a036 100644 --- a/config-CentOS-Linux-7.0-ALL +++ b/config-CentOS-Linux-7.0-ALL @@ -2,7 +2,7 @@ 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 +apply_cmd=systemctl reload nginx child_procs=4 php_socket=1 listen_mode=1 diff --git a/config-CentOS-Stream-Linux-8.0-ALL b/config-CentOS-Stream-Linux-8.0-ALL index 8bd4f03..bc7a036 100644 --- a/config-CentOS-Stream-Linux-8.0-ALL +++ b/config-CentOS-Stream-Linux-8.0-ALL @@ -2,7 +2,7 @@ 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 +apply_cmd=systemctl reload nginx child_procs=4 php_socket=1 listen_mode=1 diff --git a/config-Oracle-Linux-8.0-ALL b/config-Oracle-Linux-8.0-ALL index 8bd4f03..bc7a036 100644 --- a/config-Oracle-Linux-8.0-ALL +++ b/config-Oracle-Linux-8.0-ALL @@ -2,7 +2,7 @@ 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 +apply_cmd=systemctl reload nginx child_procs=4 php_socket=1 listen_mode=1 diff --git a/config-Redhat-Enterprise-Linux-7.0-ALL b/config-Redhat-Enterprise-Linux-7.0-ALL index 8bd4f03..bc7a036 100644 --- a/config-Redhat-Enterprise-Linux-7.0-ALL +++ b/config-Redhat-Enterprise-Linux-7.0-ALL @@ -2,7 +2,7 @@ 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 +apply_cmd=systemctl reload nginx child_procs=4 php_socket=1 listen_mode=1 diff --git a/config-Rocky-Linux-7.0-ALL b/config-Rocky-Linux-7.0-ALL index 8bd4f03..bc7a036 100644 --- a/config-Rocky-Linux-7.0-ALL +++ b/config-Rocky-Linux-7.0-ALL @@ -2,7 +2,7 @@ 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 +apply_cmd=systemctl reload nginx child_procs=4 php_socket=1 listen_mode=1 diff --git a/config-debian-linux b/config-debian-linux index 351a6d9..50f3e0b 100644 --- a/config-debian-linux +++ b/config-debian-linux @@ -2,7 +2,7 @@ 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 +apply_cmd=systemctl reload nginx add_to=/etc/nginx/sites-available add_link=/etc/nginx/sites-enabled child_procs=4 diff --git a/config-debian-linux-10.0-ALL b/config-debian-linux-10.0-ALL index 351a6d9..50f3e0b 100644 --- a/config-debian-linux-10.0-ALL +++ b/config-debian-linux-10.0-ALL @@ -2,7 +2,7 @@ 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 +apply_cmd=systemctl reload nginx add_to=/etc/nginx/sites-available add_link=/etc/nginx/sites-enabled child_procs=4 diff --git a/config-redhat-linux b/config-redhat-linux index 8bd4f03..bc7a036 100644 --- a/config-redhat-linux +++ b/config-redhat-linux @@ -2,7 +2,7 @@ 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 +apply_cmd=systemctl reload nginx child_procs=4 php_socket=1 listen_mode=1 From 85a63c4b73e2723fb37189aa64ca7d4e724bcfe0 Mon Sep 17 00:00:00 2001 From: Ilia Ross Date: Fri, 18 Aug 2023 16:25:34 +0300 Subject: [PATCH 3/7] Fix to support domain level `dom_defnames` list https://github.com/virtualmin/virtualmin-gpl/pull/615 --- virtual_feature.pl | 1 + 1 file changed, 1 insertion(+) diff --git a/virtual_feature.pl b/virtual_feature.pl index 5b455fb..ba86ef7 100644 --- a/virtual_feature.pl +++ b/virtual_feature.pl @@ -2883,6 +2883,7 @@ sub set_nginx_log_permissions sub domain_server_names { my ($d) = @_; +return split(/ /, $d->{'dom_defnames'}) if ($d->{'dom_defnames'}); return ( $d->{'dom'}, "www.".$d->{'dom'}, "mail.".$d->{'dom'} ); } From 0a62cb649b3d3ca537f453e103ced954b06e3316 Mon Sep 17 00:00:00 2001 From: Ilia Ross Date: Fri, 18 Aug 2023 16:31:37 +0300 Subject: [PATCH 4/7] Fix to consider accidental extra space in names list --- virtual_feature.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/virtual_feature.pl b/virtual_feature.pl index ba86ef7..c9676d4 100644 --- a/virtual_feature.pl +++ b/virtual_feature.pl @@ -2883,7 +2883,7 @@ sub set_nginx_log_permissions sub domain_server_names { my ($d) = @_; -return split(/ /, $d->{'dom_defnames'}) if ($d->{'dom_defnames'}); +return split(/\s+/, $d->{'dom_defnames'}) if ($d->{'dom_defnames'}); return ( $d->{'dom'}, "www.".$d->{'dom'}, "mail.".$d->{'dom'} ); } From 56d9a0abdbb867393f1f6dc5ce041ebb5b14c326 Mon Sep 17 00:00:00 2001 From: Ilia Ross Date: Tue, 29 Aug 2023 22:24:45 +0300 Subject: [PATCH 5/7] Fix to properly disable website https://github.com/virtualmin/virtualmin-gpl/issues/631 --- virtual_feature.pl | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/virtual_feature.pl b/virtual_feature.pl index c9676d4..6d11ab9 100644 --- a/virtual_feature.pl +++ b/virtual_feature.pl @@ -823,12 +823,8 @@ sub feature_disable # Disable is done via default website page my $def_tpl = &read_file_contents("$virtual_server::default_content_dir/index.html"); my %hashtmp = %$d; - $hashtmp{'TMPLTTITLE'} = $virtual_server::text{'deftmplt_website_disabled'}; - $hashtmp{'TMPLTSLOGAN'} = $virtual_server::text{'deftmplt_disable_slog'}; - if ($d->{'disabled_why'}) { - $hashtmp{'TMPLTCONTENT'} = $d->{'disabled_why'}; - } - %hashtmp = &virtual_server::populate_default_index_page(%hashtmp); + %hashtmp = &virtual_server::populate_default_index_page($d, %hashtmp); + $def_tpl = &virtual_server::replace_default_index_page($d, $def_tpl); $def_tpl = &virtual_server::substitute_virtualmin_template($def_tpl, \%hashtmp); my $msg = $tmpl->{'disabled_web'} eq 'none' ? $def_tpl : From 6146d812d42f781251fa5cac74f255195efb4f74 Mon Sep 17 00:00:00 2001 From: Ilia Ross Date: Tue, 29 Aug 2023 22:33:38 +0300 Subject: [PATCH 6/7] 2.32 --- module.info | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module.info b/module.info index fc10b59..cd40c75 100644 --- a/module.info +++ b/module.info @@ -1,4 +1,4 @@ desc=Nginx Webserver category=servers -version=2.30 +version=2.32 readonly=1 From 6e1b1253544980455c96253727d251f072d8bdcf Mon Sep 17 00:00:00 2001 From: Ilia Ross Date: Tue, 19 Sep 2023 03:12:10 +0300 Subject: [PATCH 7/7] Add openSUSE config --- config-openSUSE-Linux-15.0-ALL | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 config-openSUSE-Linux-15.0-ALL diff --git a/config-openSUSE-Linux-15.0-ALL b/config-openSUSE-Linux-15.0-ALL new file mode 100644 index 0000000..bc7a036 --- /dev/null +++ b/config-openSUSE-Linux-15.0-ALL @@ -0,0 +1,8 @@ +nginx_config=/etc/nginx/nginx.conf +nginx_cmd=/usr/sbin/nginx +start_cmd=systemctl start nginx +stop_cmd=systemctl stop nginx +apply_cmd=systemctl reload nginx +child_procs=4 +php_socket=1 +listen_mode=1