diff --git a/server/plugins-available/apache2_plugin.inc.php b/server/plugins-available/apache2_plugin.inc.php
index ce9b8dfe7015a84bf72a7f48d572bb0b669833ab..7aaee6f9564da205a25905af96a6f93493c8e099 100644
--- a/server/plugins-available/apache2_plugin.inc.php
+++ b/server/plugins-available/apache2_plugin.inc.php
@@ -1606,6 +1606,7 @@ class apache2_plugin {
 			}
 
 		}
+        if($data['old']['type'] != 'vhost') $app->system->web_folder_protection($data['old']['document_root'],true);
 	}
 
 	//* This function is called when a IP on the server is inserted, updated or deleted