summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--redis.c2
-rw-r--r--redis.conf10
2 files changed, 12 insertions, 0 deletions
diff --git a/redis.c b/redis.c
index 1701f5eaf..ab0fc659a 100644
--- a/redis.c
+++ b/redis.c
@@ -1701,6 +1701,8 @@ static void loadServerConfig(char *filename) {
if (server.dbnum < 1) {
err = "Invalid number of databases"; goto loaderr;
}
+ } else if (!strcasecmp(argv[0],"include") && argc == 2) {
+ loadServerConfig(argv[1]);
} else if (!strcasecmp(argv[0],"maxclients") && argc == 2) {
server.maxclients = atoi(argv[1]);
} else if (!strcasecmp(argv[0],"maxmemory") && argc == 2) {
diff --git a/redis.conf b/redis.conf
index 0ed593d24..fc5ac59d4 100644
--- a/redis.conf
+++ b/redis.conf
@@ -278,3 +278,13 @@ shareobjectspoolsize 1024
# configuration directives.
hash-max-zipmap-entries 64
hash-max-zipmap-value 512
+
+################################## INCLUDES ###################################
+
+# Include one or more other config files here. This is useful if you
+# have a standard template that goes to all redis server but also need
+# to customize a few per-server settings. Include files can include
+# other files, so use this wisely.
+#
+# include /path/to/local.conf
+# include /path/to/other.conf