diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000000000000000000000000000000000000..0433613b68270ac4b87fe5737cd9b92af04ea03c
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+/config.inc.php
diff --git a/www/index.php b/www/index.php
index a7291fed7c5bbe8ce1cc89fa01828ffb180f1d3e..4996ff596c2a833f4cef2a8336e0135fecd5359a 100644
--- a/www/index.php
+++ b/www/index.php
@@ -1,6 +1,11 @@
 <?php
 
-require_once dirname(__FILE__).'/../config.sample.php';
+$config_file = __DIR__ . '/../config.sample.php';
+
+if (file_exists(__DIR__ . '/../config.inc.php')) {
+    $config_file = __DIR__ . '/../config.inc.php';
+}
+require_once $config_file;
 
 UNL_Templates::setCachingService(new UNL_Templates_CachingService_Null());