diff --git a/server/plugins-available/nginx_plugin.inc.php b/server/plugins-available/nginx_plugin.inc.php
index e4d59a02bbec26a0fcc9fcd25704121584e80f31..5bc5cab79dc159409ba620b38805fe0993dd8a19 100644
--- a/server/plugins-available/nginx_plugin.inc.php
+++ b/server/plugins-available/nginx_plugin.inc.php
@@ -1939,6 +1939,16 @@ class nginx_plugin {
                         $this->goaccess_update($data, $web_config);
                 }
 
+		//* Remove the GoAccess configuration file
+		if($data['old']['stats_type'] == 'goaccess') {
+			$this->goaccess_delete($data, $web_config);
+		}
+
+                //* Remove the Webalizer configuration file
+                if($data['old']['stats_type'] == 'webalizer') {
+                        $this->webalizer_delete($data, $web_config);
+                }
+
 		//* Remove Stats-Folder when Statistics set to none
 		if($data['new']['stats_type'] == '' && ($data['new']['type'] == 'vhost' || $data['new']['type'] == 'vhostsubdomain' || $data['new']['type'] == 'vhostalias')) {
 			$app->file->removeDirectory($data['new']['document_root'].'/web/stats');
@@ -2653,6 +2663,18 @@ class nginx_plugin {
                 }
         }
 
+        //* Delete the Webalizer configuration file
+        private function webalizer_delete ($data, $web_config) {
+                global $app;
+
+                $webalizer_conf = $data['old']['document_root'] . "/log/webalizer.conf";
+
+                if ( @is_file($webalizer_conf) ) {
+                        $app->system->unlink($webalizer_conf);
+                        $app->log('Removed Webalizer config file: '.$webalizer_conf, LOGLEVEL_DEBUG);
+                }
+        }
+
 	//* Update the awstats configuration file
 	private function awstats_update ($data, $web_config) {
 		global $app;