From 08672d3068914bcadbdb3bfa25c6ad30ea707325 Mon Sep 17 00:00:00 2001 From: iliajie Date: Fri, 23 Dec 2022 17:22:39 +0200 Subject: [PATCH 1/3] Fix typo --- virtual_feature.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/virtual_feature.pl b/virtual_feature.pl index 4594133..f3a2d3f 100644 --- a/virtual_feature.pl +++ b/virtual_feature.pl @@ -2093,7 +2093,7 @@ sub feature_modify_web_balancer }, ); } -esle { +else { &save_directive($l, 'rewrite', [ ]); } &flush_config_file_lines(); From 7278413e5d831c9d4e59251bd4240f197221e7a5 Mon Sep 17 00:00:00 2001 From: iliajie Date: Fri, 23 Dec 2022 18:05:22 +0200 Subject: [PATCH 2/3] Fix to remove `proxy_redirect`, as `proxy_pass` does it all This will also fixes modifying redirects for Nginx --- virtual_feature.pl | 30 ------------------------------ 1 file changed, 30 deletions(-) diff --git a/virtual_feature.pl b/virtual_feature.pl index f3a2d3f..c1de034 100644 --- a/virtual_feature.pl +++ b/virtual_feature.pl @@ -1975,17 +1975,6 @@ sub feature_create_web_balancer my $p = $balancer->{'path'}; if ($p ne '/') { $p =~ s/\/$//; - push(@{$l->{'members'}}, - { 'name' => 'rewrite', - 'words' => [ '^'.$p.'$', $p.'/', 'redirect' ], - }, - { 'name' => 'rewrite', - 'words' => [ '^'.$p.'(/.*)', '$1', 'break' ], - }, - { 'name' => 'proxy_redirect', - 'words' => [ $url, $p ], - }, - ); } push(@{$l->{'members'}}, { 'name' => 'proxy_pass', @@ -2077,25 +2066,6 @@ sub feature_modify_web_balancer &save_directive($l, "proxy_pass", \@urls); $url = @urls ? $urls[0] : undef; } -if (@urls && $balancer->{'path'} ne '/') { - # Add rewrites for the path - my $p = $balancer->{'path'}; - $p =~ s/\/$//; - &save_directive($l, 'rewrite', - { 'name' => 'rewrite', - 'words' => [ '^'.$p.'$', $p.'/', 'redirect' ], - }, - { 'name' => 'rewrite', - 'words' => [ '^'.$p.'(/.*)', '$1', 'break' ], - }, - { 'name' => 'proxy_redirect', - 'words' => [ $url, $p ], - }, - ); - } -else { - &save_directive($l, 'rewrite', [ ]); - } &flush_config_file_lines(); &unlock_all_config_files(); &virtual_server::register_post_action(\&print_apply_nginx); From fce7765b4c65fe18c3d3ac20de1e05625d8ee60c Mon Sep 17 00:00:00 2001 From: iliajie Date: Sun, 25 Dec 2022 15:40:36 +0200 Subject: [PATCH 3/3] Fix to keep names consistent for buttons titles --- lang/en | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lang/en b/lang/en index 1b8e445..0e833c9 100644 --- a/lang/en +++ b/lang/en @@ -441,9 +441,9 @@ feat_ephpdirver=The PHP version cannot be changed to any version except the defa feat_ephpdirdelete=The PHP version cannot be removed for Nginx websites feat_manage=Configure Nginx feat_sname=Nginx Webserver -feat_sstop=Stop Nginx Webserver -feat_srestart=Restart Nginx Webserver -feat_sstart=Start Nginx Webserver +feat_sstop=Stop Nginx webserver +feat_srestart=Restart Nginx webserver +feat_sstart=Start Nginx webserver feat_sstopdesc=The Nginx webserver is currently active, and serving virtual server web pages. Click this button to shut it down. feat_sstartdesc=The Nginx webserver is currently down, meaning that all virtual server web pages are inaccessible. Click this button to start it. feat_backup=Backing up Nginx webserver configuration ..