diff --git a/lib/config.php b/lib/config.php
index c94eb278159164230a7d9e8ea29cca957a5d9627..9b87d4ce4e52988eca8886d915e8856218f7e9f7 100644
--- a/lib/config.php
+++ b/lib/config.php
@@ -130,14 +130,24 @@ class OC_Config{
 			return true;
 		}
 
-		if( !file_exists( OC::$SERVERROOT."/config/config.php" )) {
-			return false;
-		}
+		// read all file in config dir ending by config.php
+		$config_files = glob( OC::$SERVERROOT."/config/*.config.php");
+
+		//Filter only regular files
+		$config_files = array_filter($config_files, 'is_file');
+
+		//Sort array naturally :
+		natsort($config_files);
+
+		// Add default config
+		array_unshift($config_files,OC::$SERVERROOT."/config/config.php");
 
-		// Include the file, save the data from $CONFIG
-		include OC::$SERVERROOT."/config/config.php";
-		if( isset( $CONFIG ) && is_array( $CONFIG )) {
-			self::$cache = $CONFIG;
+		//Include file and merge config
+		foreach($config_files as $file){
+			include $file;
+			if( isset( $CONFIG ) && is_array( $CONFIG )) {
+				self::$cache = array_merge(self::$cache, $CONFIG);
+			}
 		}
 
 		// We cached everything