diff --git a/examples/websocket_chat/Makefile b/examples/websocket_chat/Makefile
index ae1e7cc6be856e1668ea503bfed8b3b8b006bf7e..b6244834cf4da21a84bd7223680b45017214cf9e 100644
--- a/examples/websocket_chat/Makefile
+++ b/examples/websocket_chat/Makefile
@@ -1,2 +1,3 @@
 PROG = websocket_chat
+MODULE_CFLAGS = -DMG_ENABLE_FILESYSTEM=0
 include ../examples.mk
diff --git a/examples/websocket_chat/websocket_chat.c b/examples/websocket_chat/websocket_chat.c
index d2ea624a72cdc5598489bc4a1b9c028529b699b4..3d2ad6116c25fa5c37de74805dd6273b17a94397 100644
--- a/examples/websocket_chat/websocket_chat.c
+++ b/examples/websocket_chat/websocket_chat.c
@@ -7,7 +7,6 @@
 
 static sig_atomic_t s_signal_received = 0;
 static const char *s_http_port = "8000";
-static struct mg_serve_http_opts s_http_server_opts;
 
 static void signal_handler(int sig_num) {
   signal(sig_num, signal_handler);  // Reinstantiate signal handler
@@ -69,7 +68,6 @@ int main(void) {
   mg_mgr_init(&mgr, NULL);
 
   nc = mg_bind(&mgr, s_http_port, ev_handler);
-  s_http_server_opts.document_root = ".";
   mg_set_protocol_http_websocket(nc);
 
   printf("Started on port %s\n", s_http_port);
diff --git a/mongoose.h b/mongoose.h
index 76d6226bc7fa01589b45aef9efc14aa49547e3c8..e1850e8d95bee1012970f0bf43cf3f0046b70495 100644
--- a/mongoose.h
+++ b/mongoose.h
@@ -304,7 +304,7 @@ typedef struct _stati64 cs_stat_t;
 #endif
 
 #ifndef MG_ENABLE_HTTP_CGI
-#define MG_ENABLE_HTTP_CGI 1
+#define MG_ENABLE_HTTP_CGI MG_ENABLE_FILESYSTEM
 #endif
 
 #ifndef MG_NET_IF
@@ -443,7 +443,7 @@ typedef struct stat cs_stat_t;
 #endif
 
 #ifndef MG_ENABLE_HTTP_CGI
-#define MG_ENABLE_HTTP_CGI 1
+#define MG_ENABLE_HTTP_CGI MG_ENABLE_FILESYSTEM
 #endif
 
 #ifndef MG_NET_IF