diff --git a/lib/context.c b/lib/context.c
index c78684a80f563a60429c827c4f80ffd9ff346d11..fae8f900aba56849d39ebd813c797ab5e87921e5 100644
--- a/lib/context.c
+++ b/lib/context.c
@@ -847,10 +847,14 @@ lws_create_vhost(struct lws_context *context,
 	} else
 		vh->log_fd = (int)LWS_INVALID_FILE;
 #endif
-	if (lws_context_init_server_ssl(info, vh))
+	if (lws_context_init_server_ssl(info, vh)) {
+		lwsl_err("%s: lws_context_init_server_ssl failed\n", __func__);
 		goto bail1;
-	if (lws_context_init_client_ssl(info, vh))
+	}
+	if (lws_context_init_client_ssl(info, vh)) {
+		lwsl_err("%s: lws_context_init_client_ssl failed\n", __func__);
 		goto bail1;
+	}
 	if (lws_context_init_server(info, vh)) {
 		lwsl_err("init server failed\n");
 		goto bail1;
@@ -867,8 +871,10 @@ lws_create_vhost(struct lws_context *context,
 	/* for the case we are adding a vhost much later, after server init */
 
 	if (context->protocol_init_done)
-		if (lws_protocol_init(context))
+		if (lws_protocol_init(context)) {
+			lwsl_err("%s: lws_protocol_init failed\n", __func__);
 			goto bail1;
+		}
 
 	return vh;
 
diff --git a/minimal-examples/README.md b/minimal-examples/README.md
index 6bb99528fb9b3e300118bc7d6baa5fdbb00db4e8..4561e01fae9da36aff614f3ec3166e35bdce068e 100644
--- a/minimal-examples/README.md
+++ b/minimal-examples/README.md
@@ -1,14 +1,18 @@
 |name|demonstrates|
 ---|---
-server|Minimal examples providing a server
-client|Minimal examples providing a client
+server-http|Minimal examples providing an http server
+server-ws|Minimal examples providing a ws server (and an http server)
+client-http|Minimal examples providing an http client
+client-ws|Minimal examples providing a ws client
 client-server|Minimal examples providing client and server connections simultaneously
 
 ## FAQ
 
 ### What should I look at first
 
-server/minimal-http-server
+Build and install lws itself first, these examples all want to link to it.  Then
+
+`server-http/minimal-http-server`
 
 ### Why are most of the sources split into a main C file file and a protocol file?
 
@@ -70,3 +74,4 @@ external configuration data to a specific vhost + protocol
 combination using code.  In lwsws, this is simply a matter of setting
 the desired JSON config.
 
+
diff --git a/minimal-examples/client-http/README.md b/minimal-examples/client-http/README.md
new file mode 100644
index 0000000000000000000000000000000000000000..b45fdfebd48c9db034b9ea27a9682062179994af
--- /dev/null
+++ b/minimal-examples/client-http/README.md
@@ -0,0 +1,3 @@
+|name|demonstrates|
+---|---
+minimal-http-client|Connects to and reads https://warmcat.com
diff --git a/minimal-examples/client/minimal-http-client/CMakeLists.txt b/minimal-examples/client-http/minimal-http-client/CMakeLists.txt
similarity index 100%
rename from minimal-examples/client/minimal-http-client/CMakeLists.txt
rename to minimal-examples/client-http/minimal-http-client/CMakeLists.txt
diff --git a/minimal-examples/client/minimal-http-client/README.md b/minimal-examples/client-http/minimal-http-client/README.md
similarity index 100%
rename from minimal-examples/client/minimal-http-client/README.md
rename to minimal-examples/client-http/minimal-http-client/README.md
diff --git a/minimal-examples/client/minimal-http-client/minimal-http-client.c b/minimal-examples/client-http/minimal-http-client/minimal-http-client.c
similarity index 100%
rename from minimal-examples/client/minimal-http-client/minimal-http-client.c
rename to minimal-examples/client-http/minimal-http-client/minimal-http-client.c
diff --git a/minimal-examples/client/README.md b/minimal-examples/client-ws/README.md
similarity index 67%
rename from minimal-examples/client/README.md
rename to minimal-examples/client-ws/README.md
index 11af3e229240b099faa0fae67353c66716c46ee4..21433e0944e5191de7561153a0076b604b7dbcd2 100644
--- a/minimal-examples/client/README.md
+++ b/minimal-examples/client-ws/README.md
@@ -1,4 +1,3 @@
 |name|demonstrates|
 ---|---
-minimal-http-client|Connects to and reads https://warmcat.com
 minimal-ws-client|Connects to the dumb-increment-protocol wss server at https://libwebsockets.org
diff --git a/minimal-examples/client/minimal-ws-client/CMakeLists.txt b/minimal-examples/client-ws/minimal-ws-client/CMakeLists.txt
similarity index 100%
rename from minimal-examples/client/minimal-ws-client/CMakeLists.txt
rename to minimal-examples/client-ws/minimal-ws-client/CMakeLists.txt
diff --git a/minimal-examples/client/minimal-ws-client/README.md b/minimal-examples/client-ws/minimal-ws-client/README.md
similarity index 100%
rename from minimal-examples/client/minimal-ws-client/README.md
rename to minimal-examples/client-ws/minimal-ws-client/README.md
diff --git a/minimal-examples/client/minimal-ws-client/minimal-ws-client.c b/minimal-examples/client-ws/minimal-ws-client/minimal-ws-client.c
similarity index 100%
rename from minimal-examples/client/minimal-ws-client/minimal-ws-client.c
rename to minimal-examples/client-ws/minimal-ws-client/minimal-ws-client.c
diff --git a/minimal-examples/server-http/README.md b/minimal-examples/server-http/README.md
new file mode 100644
index 0000000000000000000000000000000000000000..9a72f66ebba14f22b2f84f4d48dbd30eccfd85c3
--- /dev/null
+++ b/minimal-examples/server-http/README.md
@@ -0,0 +1,6 @@
+|Example|Demonstrates|
+---|---
+minimal-http-server|Serves a directory over http/1 or http/2, custom 404 handler
+minimal-http-server-libuv|Same as minimal-http-server but libuv event loop
+minimal-http-server-multivhost|Same as minimal-http-server but three different vhosts
+minimal-http-server-smp|Multiple service threads
diff --git a/minimal-examples/server/minimal-http-server-libuv/CMakeLists.txt b/minimal-examples/server-http/minimal-http-server-libuv/CMakeLists.txt
similarity index 100%
rename from minimal-examples/server/minimal-http-server-libuv/CMakeLists.txt
rename to minimal-examples/server-http/minimal-http-server-libuv/CMakeLists.txt
diff --git a/minimal-examples/server/minimal-http-server-libuv/README.md b/minimal-examples/server-http/minimal-http-server-libuv/README.md
similarity index 100%
rename from minimal-examples/server/minimal-http-server-libuv/README.md
rename to minimal-examples/server-http/minimal-http-server-libuv/README.md
diff --git a/minimal-examples/server/minimal-http-server-libuv/minimal-http-server.c b/minimal-examples/server-http/minimal-http-server-libuv/minimal-http-server.c
similarity index 100%
rename from minimal-examples/server/minimal-http-server-libuv/minimal-http-server.c
rename to minimal-examples/server-http/minimal-http-server-libuv/minimal-http-server.c
diff --git a/minimal-examples/server/minimal-http-server-libuv/mount-origin/404.html b/minimal-examples/server-http/minimal-http-server-libuv/mount-origin/404.html
similarity index 100%
rename from minimal-examples/server/minimal-http-server-libuv/mount-origin/404.html
rename to minimal-examples/server-http/minimal-http-server-libuv/mount-origin/404.html
diff --git a/minimal-examples/server/minimal-http-server-libuv/mount-origin/favicon.ico b/minimal-examples/server-http/minimal-http-server-libuv/mount-origin/favicon.ico
similarity index 100%
rename from minimal-examples/server/minimal-http-server-libuv/mount-origin/favicon.ico
rename to minimal-examples/server-http/minimal-http-server-libuv/mount-origin/favicon.ico
diff --git a/minimal-examples/server/minimal-http-server-libuv/mount-origin/index.html b/minimal-examples/server-http/minimal-http-server-libuv/mount-origin/index.html
similarity index 100%
rename from minimal-examples/server/minimal-http-server-libuv/mount-origin/index.html
rename to minimal-examples/server-http/minimal-http-server-libuv/mount-origin/index.html
diff --git a/minimal-examples/server/minimal-http-server-libuv/mount-origin/libwebsockets.org-logo.png b/minimal-examples/server-http/minimal-http-server-libuv/mount-origin/libwebsockets.org-logo.png
similarity index 100%
rename from minimal-examples/server/minimal-http-server-libuv/mount-origin/libwebsockets.org-logo.png
rename to minimal-examples/server-http/minimal-http-server-libuv/mount-origin/libwebsockets.org-logo.png
diff --git a/minimal-examples/server-http/minimal-http-server-multivhost/CMakeLists.txt b/minimal-examples/server-http/minimal-http-server-multivhost/CMakeLists.txt
new file mode 100644
index 0000000000000000000000000000000000000000..5077704af54139a4bdc226238a49caa498e2ffa7
--- /dev/null
+++ b/minimal-examples/server-http/minimal-http-server-multivhost/CMakeLists.txt
@@ -0,0 +1,12 @@
+cmake_minimum_required(VERSION 2.8)
+
+set(SAMP lws-minimal-http-server-multivhost)
+set(SRCS minimal-http-server.c)
+
+if (UNIX)
+      set(CMAKE_C_FLAGS "-Wall -Wsign-compare -Wignored-qualifiers -Wtype-limits -Wuninitialized -Werror -Wundef ${CMAKE_C_FLAGS}" )
+endif()
+
+add_executable(${SAMP} ${SRCS})
+target_link_libraries(${SAMP} -lwebsockets)
+
diff --git a/minimal-examples/server-http/minimal-http-server-multivhost/README.md b/minimal-examples/server-http/minimal-http-server-multivhost/README.md
new file mode 100644
index 0000000000000000000000000000000000000000..42172208438a50e7939295db532c5f2ed8cf0ad6
--- /dev/null
+++ b/minimal-examples/server-http/minimal-http-server-multivhost/README.md
@@ -0,0 +1,43 @@
+# lws minimal http server multivhost
+
+This creates a single server that creates three vhosts listening on both :7681 and
+:7682.  Two separate vhosts share listening on :7682.
+
+|vhost|listens on port|serves|
+---|---|---
+localhost1|7681|./mount-origin-localhost1
+localhost2|7682|./mount-origin-localhost2
+localhost3|7682|./mount-origin-localhost3
+
+Notice the last two both listen on 7682.  If you visit http://localhost:7682,
+by default you will get mapped to the first one, localhost2.
+
+However if you edit /etc/hosts on your machine and add
+
+```
+127.0.0.1 localhost3
+```
+
+so that you can visit http://localhost3:7682 in your browser, lws will use the
+`Host: localhost3` header sent by your browser to select the localhost3 vhost
+for the connection, and you will be served content from ./mount-origin-localhost3
+
+## build
+
+```
+ $ cmake . && make
+```
+
+## usage
+
+```
+ $ ./lws-minimal-http-server-multivhost
+[2018/03/16 09:37:20:0866] USER: LWS minimal http server-multivhost | visit http://localhost:7681 / 7682
+[2018/03/16 09:37:20:0867] NOTICE: Creating Vhost 'localhost1' port 7681, 1 protocols, IPv6 off
+[2018/03/16 09:37:20:0868] NOTICE: Creating Vhost 'localhost2' port 7682, 1 protocols, IPv6 off
+[2018/03/16 09:37:20:0869] NOTICE: Creating Vhost 'localhost3' port 7682, 1 protocols, IPv6 off
+[2018/03/16 09:37:20:0869] NOTICE:  using listen skt from vhost localhost2
+```
+
+Visit http://localhost:7681 and http://localhost:7682
+
diff --git a/minimal-examples/server-http/minimal-http-server-multivhost/minimal-http-server.c b/minimal-examples/server-http/minimal-http-server-multivhost/minimal-http-server.c
new file mode 100644
index 0000000000000000000000000000000000000000..d73ac72930fe45da49baafea488006e50ea75f69
--- /dev/null
+++ b/minimal-examples/server-http/minimal-http-server-multivhost/minimal-http-server.c
@@ -0,0 +1,158 @@
+/*
+ * lws-minimal-http-server-multivhost
+ *
+ * Copyright (C) 2018 Andy Green <andy@warmcat.com>
+ *
+ * This file is made available under the Creative Commons CC0 1.0
+ * Universal Public Domain Dedication.
+ *
+ * This demonstrates the most minimal http server you can make with lws.
+ *
+ * To keep it simple, it serves stuff from the subdirectory 
+ * "./mount-origin" of the directory it was started in.
+ * You can change that by changing mount.origin below.
+ */
+
+#include <libwebsockets.h>
+#include <string.h>
+#include <signal.h>
+
+static int interrupted;
+
+static const struct lws_http_mount mount_localhost1 = {
+	/* .mount_next */		NULL,		/* linked-list "next" */
+	/* .mountpoint */		"/",		/* mountpoint URL */
+	/* .origin */			"./mount-origin-localhost1",
+	/* .def */			"index.html",	/* default filename */
+	/* .protocol */			NULL,
+	/* .cgienv */			NULL,
+	/* .extra_mimetypes */		NULL,
+	/* .interpret */		NULL,
+	/* .cgi_timeout */		0,
+	/* .cache_max_age */		0,
+	/* .auth_mask */		0,
+	/* .cache_reusable */		0,
+	/* .cache_revalidate */		0,
+	/* .cache_intermediaries */	0,
+	/* .origin_protocol */		LWSMPRO_FILE,	/* files in a dir */
+	/* .mountpoint_len */		1,		/* char count */
+	/* .basic_auth_login_file */	NULL,
+}, mount_localhost2 = {
+	/* .mount_next */		NULL,		/* linked-list "next" */
+	/* .mountpoint */		"/",		/* mountpoint URL */
+	/* .origin */			"./mount-origin-localhost2",
+	/* .def */			"index.html",	/* default filename */
+	/* .protocol */			NULL,
+	/* .cgienv */			NULL,
+	/* .extra_mimetypes */		NULL,
+	/* .interpret */		NULL,
+	/* .cgi_timeout */		0,
+	/* .cache_max_age */		0,
+	/* .auth_mask */		0,
+	/* .cache_reusable */		0,
+	/* .cache_revalidate */		0,
+	/* .cache_intermediaries */	0,
+	/* .origin_protocol */		LWSMPRO_FILE,	/* files in a dir */
+	/* .mountpoint_len */		1,		/* char count */
+	/* .basic_auth_login_file */	NULL,
+}, mount_localhost3 = {
+	/* .mount_next */		NULL,		/* linked-list "next" */
+	/* .mountpoint */		"/",		/* mountpoint URL */
+	/* .origin */			"./mount-origin-localhost3",
+	/* .def */			"index.html",	/* default filename */
+	/* .protocol */			NULL,
+	/* .cgienv */			NULL,
+	/* .extra_mimetypes */		NULL,
+	/* .interpret */		NULL,
+	/* .cgi_timeout */		0,
+	/* .cache_max_age */		0,
+	/* .auth_mask */		0,
+	/* .cache_reusable */		0,
+	/* .cache_revalidate */		0,
+	/* .cache_intermediaries */	0,
+	/* .origin_protocol */		LWSMPRO_FILE,	/* files in a dir */
+	/* .mountpoint_len */		1,		/* char count */
+	/* .basic_auth_login_file */	NULL,
+};
+
+void sigint_handler(int sig)
+{
+	interrupted = 1;
+}
+
+int main(int argc, char **argv)
+{
+	struct lws_context_creation_info info;
+	struct lws_context *context;
+	int n = 0;
+
+	signal(SIGINT, sigint_handler);
+
+	memset(&info, 0, sizeof info); /* otherwise uninitialized garbage */
+	info.options = LWS_SERVER_OPTION_EXPLICIT_VHOSTS;
+
+	lws_set_log_level(LLL_ERR | LLL_WARN | LLL_NOTICE | LLL_USER
+			  /* | LLL_INFO */ /* | LLL_DEBUG */, NULL);
+
+	lwsl_user("LWS minimal http server-multivhost | visit http://localhost:7681 / 7682\n");
+
+	/*
+	 * Because of LWS_SERVER_OPTION_EXPLICIT_VHOSTS, this only creates
+	 * the context and no longer creates a default vhost
+	 */
+	context = lws_create_context(&info);
+	if (!context) {
+		lwsl_err("lws init failed\n");
+		return 1;
+	}
+
+	/* it's our job now to create the vhosts we want:
+	 *
+	 *   - "localhost1" listen on 7681 and serve ./mount-origin-localhost1/
+	 *   - "localhost2" listen on 7682 and serve ./mount-origin-localhost2/
+	 *   - "localhost3" share 7682 and serve ./mount-origin-localhost3/
+	 *
+	 * Note lws supports dynamic vhost creation and destruction at runtime.
+	 * When using multi-vhost with your own protocols, you must provide a
+	 * pvo for each vhost naming each protocol you want enabled on it.
+	 * minimal-ws-server-threads demonstrates how to provide pvos.
+	 */
+
+	info.port = 7681;
+	info.mounts = &mount_localhost1;
+	info.error_document_404 = "/404.html";
+	info.vhost_name = "localhost1";
+
+	if (!lws_create_vhost(context, &info)) {
+		lwsl_err("Failed to create first vhost\n");
+		goto bail;
+	}
+
+	info.port = 7682;
+	info.mounts = &mount_localhost2;
+	info.error_document_404 = "/404.html";
+	info.vhost_name = "localhost2";
+
+	if (!lws_create_vhost(context, &info)) {
+		lwsl_err("Failed to create second vhost\n");
+		goto bail;
+	}
+
+	/* a second vhost listens on port 7682 */
+	info.mounts = &mount_localhost3;
+	info.error_document_404 = "/404.html";
+	info.vhost_name = "localhost3";
+
+	if (!lws_create_vhost(context, &info)) {
+		lwsl_err("Failed to create third vhost\n");
+		goto bail;
+	}
+
+	while (n >= 0 && !interrupted)
+		n = lws_service(context, 1000);
+
+bail:
+	lws_context_destroy(context);
+
+	return 0;
+}
diff --git a/minimal-examples/server-http/minimal-http-server-multivhost/mount-origin-localhost1/404.html b/minimal-examples/server-http/minimal-http-server-multivhost/mount-origin-localhost1/404.html
new file mode 100644
index 0000000000000000000000000000000000000000..ab948658294cfdd31d4a4fbbc259e093723ba54f
--- /dev/null
+++ b/minimal-examples/server-http/minimal-http-server-multivhost/mount-origin-localhost1/404.html
@@ -0,0 +1,9 @@
+<meta charset="UTF-8"> 
+<html>
+	<body>
+		<img src="libwebsockets.org-logo.png"><br>
+		<h1>404 (vhost localhost1)</h1>
+		Sorry, that file doesn't exist.
+	</body>
+</html>
+
diff --git a/minimal-examples/server/minimal-http-server-smp/mount-origin/favicon.ico b/minimal-examples/server-http/minimal-http-server-multivhost/mount-origin-localhost1/favicon.ico
similarity index 100%
rename from minimal-examples/server/minimal-http-server-smp/mount-origin/favicon.ico
rename to minimal-examples/server-http/minimal-http-server-multivhost/mount-origin-localhost1/favicon.ico
diff --git a/minimal-examples/server-http/minimal-http-server-multivhost/mount-origin-localhost1/index.html b/minimal-examples/server-http/minimal-http-server-multivhost/mount-origin-localhost1/index.html
new file mode 100644
index 0000000000000000000000000000000000000000..df01441e5d8c8c93a3c3f9b877423e2989b9ac38
--- /dev/null
+++ b/minimal-examples/server-http/minimal-http-server-multivhost/mount-origin-localhost1/index.html
@@ -0,0 +1,14 @@
+ <meta charset="UTF-8"> 
+<html>
+	<body>
+		<img src="libwebsockets.org-logo.png"><br>
+	
+		Hello from the <b>minimal http server multivhost example</b>.<br>
+		<br>
+		This was served from <i>./mount-origin-<b>localhost1</b>/index.html</i><br>
+		<br>
+		You can confirm the 404 page handler by going to this
+		nonexistant <a href="notextant.html">page</a>.
+	</body>
+</html>
+
diff --git a/minimal-examples/server/minimal-http-server-smp/mount-origin/libwebsockets.org-logo.png b/minimal-examples/server-http/minimal-http-server-multivhost/mount-origin-localhost1/libwebsockets.org-logo.png
similarity index 100%
rename from minimal-examples/server/minimal-http-server-smp/mount-origin/libwebsockets.org-logo.png
rename to minimal-examples/server-http/minimal-http-server-multivhost/mount-origin-localhost1/libwebsockets.org-logo.png
diff --git a/minimal-examples/server-http/minimal-http-server-multivhost/mount-origin-localhost2/404.html b/minimal-examples/server-http/minimal-http-server-multivhost/mount-origin-localhost2/404.html
new file mode 100644
index 0000000000000000000000000000000000000000..1591faf5a43c6b9dad590900f8c1d90868634e86
--- /dev/null
+++ b/minimal-examples/server-http/minimal-http-server-multivhost/mount-origin-localhost2/404.html
@@ -0,0 +1,9 @@
+<meta charset="UTF-8"> 
+<html>
+	<body>
+		<img src="libwebsockets.org-logo.png"><br>
+		<h1>404 (vhost localhost2)</h1>
+		Sorry, that file doesn't exist.
+	</body>
+</html>
+
diff --git a/minimal-examples/server/minimal-http-server/mount-origin/favicon.ico b/minimal-examples/server-http/minimal-http-server-multivhost/mount-origin-localhost2/favicon.ico
similarity index 100%
rename from minimal-examples/server/minimal-http-server/mount-origin/favicon.ico
rename to minimal-examples/server-http/minimal-http-server-multivhost/mount-origin-localhost2/favicon.ico
diff --git a/minimal-examples/server-http/minimal-http-server-multivhost/mount-origin-localhost2/index.html b/minimal-examples/server-http/minimal-http-server-multivhost/mount-origin-localhost2/index.html
new file mode 100644
index 0000000000000000000000000000000000000000..33caf445cb4a45a9faa8321d45e78da0996ef615
--- /dev/null
+++ b/minimal-examples/server-http/minimal-http-server-multivhost/mount-origin-localhost2/index.html
@@ -0,0 +1,14 @@
+ <meta charset="UTF-8"> 
+<html>
+	<body>
+		<img src="libwebsockets.org-logo.png"><br>
+	
+		Hello from the <b>minimal http server multivhost example</b>.<br>
+		<br>
+		This was served from <i>./mount-origin-<b>localhost2</b>/index.html</i><br>
+		<br>
+		You can confirm the 404 page handler by going to this
+		nonexistant <a href="notextant.html">page</a>.
+	</body>
+</html>
+
diff --git a/minimal-examples/server/minimal-http-server/mount-origin/libwebsockets.org-logo.png b/minimal-examples/server-http/minimal-http-server-multivhost/mount-origin-localhost2/libwebsockets.org-logo.png
similarity index 100%
rename from minimal-examples/server/minimal-http-server/mount-origin/libwebsockets.org-logo.png
rename to minimal-examples/server-http/minimal-http-server-multivhost/mount-origin-localhost2/libwebsockets.org-logo.png
diff --git a/minimal-examples/server-http/minimal-http-server-multivhost/mount-origin-localhost3/404.html b/minimal-examples/server-http/minimal-http-server-multivhost/mount-origin-localhost3/404.html
new file mode 100644
index 0000000000000000000000000000000000000000..0c054569ca944b4327fbd9dc5dfeb973d64821f2
--- /dev/null
+++ b/minimal-examples/server-http/minimal-http-server-multivhost/mount-origin-localhost3/404.html
@@ -0,0 +1,9 @@
+<meta charset="UTF-8"> 
+<html>
+	<body>
+		<img src="libwebsockets.org-logo.png"><br>
+		<h1>404 (vhost localhost3)</h1>
+		Sorry, that file doesn't exist.
+	</body>
+</html>
+
diff --git a/minimal-examples/server/minimal-ws-broker/mount-origin/favicon.ico b/minimal-examples/server-http/minimal-http-server-multivhost/mount-origin-localhost3/favicon.ico
similarity index 100%
rename from minimal-examples/server/minimal-ws-broker/mount-origin/favicon.ico
rename to minimal-examples/server-http/minimal-http-server-multivhost/mount-origin-localhost3/favicon.ico
diff --git a/minimal-examples/server-http/minimal-http-server-multivhost/mount-origin-localhost3/index.html b/minimal-examples/server-http/minimal-http-server-multivhost/mount-origin-localhost3/index.html
new file mode 100644
index 0000000000000000000000000000000000000000..85ca5027e9620702fa760cff465fdcab2cfadd92
--- /dev/null
+++ b/minimal-examples/server-http/minimal-http-server-multivhost/mount-origin-localhost3/index.html
@@ -0,0 +1,14 @@
+ <meta charset="UTF-8"> 
+<html>
+	<body>
+		<img src="libwebsockets.org-logo.png"><br>
+	
+		Hello from the <b>minimal http server multivhost example</b>.<br>
+		<br>
+		This was served from <i>./mount-origin-<b>localhost3</b>/index.html</i><br>
+		<br>
+		You can confirm the 404 page handler by going to this
+		nonexistant <a href="notextant.html">page</a>.
+	</body>
+</html>
+
diff --git a/minimal-examples/server/minimal-ws-broker/mount-origin/libwebsockets.org-logo.png b/minimal-examples/server-http/minimal-http-server-multivhost/mount-origin-localhost3/libwebsockets.org-logo.png
similarity index 100%
rename from minimal-examples/server/minimal-ws-broker/mount-origin/libwebsockets.org-logo.png
rename to minimal-examples/server-http/minimal-http-server-multivhost/mount-origin-localhost3/libwebsockets.org-logo.png
diff --git a/minimal-examples/server/minimal-http-server-smp/CMakeLists.txt b/minimal-examples/server-http/minimal-http-server-smp/CMakeLists.txt
similarity index 100%
rename from minimal-examples/server/minimal-http-server-smp/CMakeLists.txt
rename to minimal-examples/server-http/minimal-http-server-smp/CMakeLists.txt
diff --git a/minimal-examples/server/minimal-http-server-smp/README.md b/minimal-examples/server-http/minimal-http-server-smp/README.md
similarity index 100%
rename from minimal-examples/server/minimal-http-server-smp/README.md
rename to minimal-examples/server-http/minimal-http-server-smp/README.md
diff --git a/minimal-examples/server/minimal-http-server-smp/minimal-http-server-smp.c b/minimal-examples/server-http/minimal-http-server-smp/minimal-http-server-smp.c
similarity index 100%
rename from minimal-examples/server/minimal-http-server-smp/minimal-http-server-smp.c
rename to minimal-examples/server-http/minimal-http-server-smp/minimal-http-server-smp.c
diff --git a/minimal-examples/server/minimal-ws-server-pmd-bulk/mount-origin/favicon.ico b/minimal-examples/server-http/minimal-http-server-smp/mount-origin/favicon.ico
similarity index 100%
rename from minimal-examples/server/minimal-ws-server-pmd-bulk/mount-origin/favicon.ico
rename to minimal-examples/server-http/minimal-http-server-smp/mount-origin/favicon.ico
diff --git a/minimal-examples/server/minimal-http-server-smp/mount-origin/index.html b/minimal-examples/server-http/minimal-http-server-smp/mount-origin/index.html
similarity index 100%
rename from minimal-examples/server/minimal-http-server-smp/mount-origin/index.html
rename to minimal-examples/server-http/minimal-http-server-smp/mount-origin/index.html
diff --git a/minimal-examples/server/minimal-ws-server-pmd-bulk/mount-origin/libwebsockets.org-logo.png b/minimal-examples/server-http/minimal-http-server-smp/mount-origin/libwebsockets.org-logo.png
similarity index 100%
rename from minimal-examples/server/minimal-ws-server-pmd-bulk/mount-origin/libwebsockets.org-logo.png
rename to minimal-examples/server-http/minimal-http-server-smp/mount-origin/libwebsockets.org-logo.png
diff --git a/minimal-examples/server/minimal-http-server/CMakeLists.txt b/minimal-examples/server-http/minimal-http-server/CMakeLists.txt
similarity index 100%
rename from minimal-examples/server/minimal-http-server/CMakeLists.txt
rename to minimal-examples/server-http/minimal-http-server/CMakeLists.txt
diff --git a/minimal-examples/server/minimal-http-server/README.md b/minimal-examples/server-http/minimal-http-server/README.md
similarity index 100%
rename from minimal-examples/server/minimal-http-server/README.md
rename to minimal-examples/server-http/minimal-http-server/README.md
diff --git a/minimal-examples/server/minimal-http-server/minimal-http-server.c b/minimal-examples/server-http/minimal-http-server/minimal-http-server.c
similarity index 100%
rename from minimal-examples/server/minimal-http-server/minimal-http-server.c
rename to minimal-examples/server-http/minimal-http-server/minimal-http-server.c
diff --git a/minimal-examples/server/minimal-http-server/mount-origin/404.html b/minimal-examples/server-http/minimal-http-server/mount-origin/404.html
similarity index 100%
rename from minimal-examples/server/minimal-http-server/mount-origin/404.html
rename to minimal-examples/server-http/minimal-http-server/mount-origin/404.html
diff --git a/minimal-examples/server/minimal-ws-server-pmd/mount-origin/favicon.ico b/minimal-examples/server-http/minimal-http-server/mount-origin/favicon.ico
similarity index 100%
rename from minimal-examples/server/minimal-ws-server-pmd/mount-origin/favicon.ico
rename to minimal-examples/server-http/minimal-http-server/mount-origin/favicon.ico
diff --git a/minimal-examples/server/minimal-http-server/mount-origin/index.html b/minimal-examples/server-http/minimal-http-server/mount-origin/index.html
similarity index 100%
rename from minimal-examples/server/minimal-http-server/mount-origin/index.html
rename to minimal-examples/server-http/minimal-http-server/mount-origin/index.html
diff --git a/minimal-examples/server/minimal-ws-server-pmd/mount-origin/libwebsockets.org-logo.png b/minimal-examples/server-http/minimal-http-server/mount-origin/libwebsockets.org-logo.png
similarity index 100%
rename from minimal-examples/server/minimal-ws-server-pmd/mount-origin/libwebsockets.org-logo.png
rename to minimal-examples/server-http/minimal-http-server/mount-origin/libwebsockets.org-logo.png
diff --git a/minimal-examples/server/README.md b/minimal-examples/server-ws/README.md
similarity index 73%
rename from minimal-examples/server/README.md
rename to minimal-examples/server-ws/README.md
index 628eb0539bc6a5e765140e5057e37df55488fd61..0112d62579ce643b6d29f5ff61ea3e54dc5193dd 100644
--- a/minimal-examples/server/README.md
+++ b/minimal-examples/server-ws/README.md
@@ -1,8 +1,5 @@
 |Example|Demonstrates|
 ---|---
-minimal-http-server|Serves a directory over http/1 or http/2, custom 404 handler
-minimal-http-server-libuv|Same as minimal-http-server but libuv event loop
-minimal-http-server-smp|Multiple service threads
 minimal-ws-server|Serves an index.html over http that opens a ws shared chat client in a browser
 minimal-ws-server-pmd|Simple ws server with permessage-deflate support
 minimal-ws-server-pmd-bulk|Simple ws server showing how to pass bulk data with permessage-deflate
diff --git a/minimal-examples/server/minimal-ws-broker/CMakeLists.txt b/minimal-examples/server-ws/minimal-ws-broker/CMakeLists.txt
similarity index 100%
rename from minimal-examples/server/minimal-ws-broker/CMakeLists.txt
rename to minimal-examples/server-ws/minimal-ws-broker/CMakeLists.txt
diff --git a/minimal-examples/server/minimal-ws-broker/README.md b/minimal-examples/server-ws/minimal-ws-broker/README.md
similarity index 100%
rename from minimal-examples/server/minimal-ws-broker/README.md
rename to minimal-examples/server-ws/minimal-ws-broker/README.md
diff --git a/minimal-examples/server/minimal-ws-broker/minimal-ws-broker.c b/minimal-examples/server-ws/minimal-ws-broker/minimal-ws-broker.c
similarity index 100%
rename from minimal-examples/server/minimal-ws-broker/minimal-ws-broker.c
rename to minimal-examples/server-ws/minimal-ws-broker/minimal-ws-broker.c
diff --git a/minimal-examples/server/minimal-ws-server-ring/mount-origin/favicon.ico b/minimal-examples/server-ws/minimal-ws-broker/mount-origin/favicon.ico
similarity index 100%
rename from minimal-examples/server/minimal-ws-server-ring/mount-origin/favicon.ico
rename to minimal-examples/server-ws/minimal-ws-broker/mount-origin/favicon.ico
diff --git a/minimal-examples/server/minimal-ws-broker/mount-origin/index.html b/minimal-examples/server-ws/minimal-ws-broker/mount-origin/index.html
similarity index 100%
rename from minimal-examples/server/minimal-ws-broker/mount-origin/index.html
rename to minimal-examples/server-ws/minimal-ws-broker/mount-origin/index.html
diff --git a/minimal-examples/server/minimal-ws-server-ring/mount-origin/libwebsockets.org-logo.png b/minimal-examples/server-ws/minimal-ws-broker/mount-origin/libwebsockets.org-logo.png
similarity index 100%
rename from minimal-examples/server/minimal-ws-server-ring/mount-origin/libwebsockets.org-logo.png
rename to minimal-examples/server-ws/minimal-ws-broker/mount-origin/libwebsockets.org-logo.png
diff --git a/minimal-examples/server/minimal-ws-broker/protocol_lws_minimal.c b/minimal-examples/server-ws/minimal-ws-broker/protocol_lws_minimal.c
similarity index 100%
rename from minimal-examples/server/minimal-ws-broker/protocol_lws_minimal.c
rename to minimal-examples/server-ws/minimal-ws-broker/protocol_lws_minimal.c
diff --git a/minimal-examples/server/minimal-ws-server-pmd-bulk/CMakeLists.txt b/minimal-examples/server-ws/minimal-ws-server-pmd-bulk/CMakeLists.txt
similarity index 100%
rename from minimal-examples/server/minimal-ws-server-pmd-bulk/CMakeLists.txt
rename to minimal-examples/server-ws/minimal-ws-server-pmd-bulk/CMakeLists.txt
diff --git a/minimal-examples/server/minimal-ws-server-pmd-bulk/README.md b/minimal-examples/server-ws/minimal-ws-server-pmd-bulk/README.md
similarity index 100%
rename from minimal-examples/server/minimal-ws-server-pmd-bulk/README.md
rename to minimal-examples/server-ws/minimal-ws-server-pmd-bulk/README.md
diff --git a/minimal-examples/server/minimal-ws-server-pmd-bulk/minimal-ws-server-pmd-bulk.c b/minimal-examples/server-ws/minimal-ws-server-pmd-bulk/minimal-ws-server-pmd-bulk.c
similarity index 100%
rename from minimal-examples/server/minimal-ws-server-pmd-bulk/minimal-ws-server-pmd-bulk.c
rename to minimal-examples/server-ws/minimal-ws-server-pmd-bulk/minimal-ws-server-pmd-bulk.c
diff --git a/minimal-examples/server/minimal-ws-server-threads/mount-origin/favicon.ico b/minimal-examples/server-ws/minimal-ws-server-pmd-bulk/mount-origin/favicon.ico
similarity index 100%
rename from minimal-examples/server/minimal-ws-server-threads/mount-origin/favicon.ico
rename to minimal-examples/server-ws/minimal-ws-server-pmd-bulk/mount-origin/favicon.ico
diff --git a/minimal-examples/server/minimal-ws-server-pmd-bulk/mount-origin/index.html b/minimal-examples/server-ws/minimal-ws-server-pmd-bulk/mount-origin/index.html
similarity index 100%
rename from minimal-examples/server/minimal-ws-server-pmd-bulk/mount-origin/index.html
rename to minimal-examples/server-ws/minimal-ws-server-pmd-bulk/mount-origin/index.html
diff --git a/minimal-examples/server/minimal-ws-server-threads/mount-origin/libwebsockets.org-logo.png b/minimal-examples/server-ws/minimal-ws-server-pmd-bulk/mount-origin/libwebsockets.org-logo.png
similarity index 100%
rename from minimal-examples/server/minimal-ws-server-threads/mount-origin/libwebsockets.org-logo.png
rename to minimal-examples/server-ws/minimal-ws-server-pmd-bulk/mount-origin/libwebsockets.org-logo.png
diff --git a/minimal-examples/server/minimal-ws-server-pmd-bulk/protocol_lws_minimal_pmd_bulk.c b/minimal-examples/server-ws/minimal-ws-server-pmd-bulk/protocol_lws_minimal_pmd_bulk.c
similarity index 100%
rename from minimal-examples/server/minimal-ws-server-pmd-bulk/protocol_lws_minimal_pmd_bulk.c
rename to minimal-examples/server-ws/minimal-ws-server-pmd-bulk/protocol_lws_minimal_pmd_bulk.c
diff --git a/minimal-examples/server/minimal-ws-server-pmd/CMakeLists.txt b/minimal-examples/server-ws/minimal-ws-server-pmd/CMakeLists.txt
similarity index 100%
rename from minimal-examples/server/minimal-ws-server-pmd/CMakeLists.txt
rename to minimal-examples/server-ws/minimal-ws-server-pmd/CMakeLists.txt
diff --git a/minimal-examples/server/minimal-ws-server-pmd/README.md b/minimal-examples/server-ws/minimal-ws-server-pmd/README.md
similarity index 100%
rename from minimal-examples/server/minimal-ws-server-pmd/README.md
rename to minimal-examples/server-ws/minimal-ws-server-pmd/README.md
diff --git a/minimal-examples/server/minimal-ws-server-pmd/minimal-ws-server-pmd.c b/minimal-examples/server-ws/minimal-ws-server-pmd/minimal-ws-server-pmd.c
similarity index 100%
rename from minimal-examples/server/minimal-ws-server-pmd/minimal-ws-server-pmd.c
rename to minimal-examples/server-ws/minimal-ws-server-pmd/minimal-ws-server-pmd.c
diff --git a/minimal-examples/server/minimal-ws-server/mount-origin/favicon.ico b/minimal-examples/server-ws/minimal-ws-server-pmd/mount-origin/favicon.ico
similarity index 100%
rename from minimal-examples/server/minimal-ws-server/mount-origin/favicon.ico
rename to minimal-examples/server-ws/minimal-ws-server-pmd/mount-origin/favicon.ico
diff --git a/minimal-examples/server/minimal-ws-server-pmd/mount-origin/index.html b/minimal-examples/server-ws/minimal-ws-server-pmd/mount-origin/index.html
similarity index 100%
rename from minimal-examples/server/minimal-ws-server-pmd/mount-origin/index.html
rename to minimal-examples/server-ws/minimal-ws-server-pmd/mount-origin/index.html
diff --git a/minimal-examples/server/minimal-ws-server/mount-origin/libwebsockets.org-logo.png b/minimal-examples/server-ws/minimal-ws-server-pmd/mount-origin/libwebsockets.org-logo.png
similarity index 100%
rename from minimal-examples/server/minimal-ws-server/mount-origin/libwebsockets.org-logo.png
rename to minimal-examples/server-ws/minimal-ws-server-pmd/mount-origin/libwebsockets.org-logo.png
diff --git a/minimal-examples/server/minimal-ws-server-pmd/protocol_lws_minimal.c b/minimal-examples/server-ws/minimal-ws-server-pmd/protocol_lws_minimal.c
similarity index 100%
rename from minimal-examples/server/minimal-ws-server-pmd/protocol_lws_minimal.c
rename to minimal-examples/server-ws/minimal-ws-server-pmd/protocol_lws_minimal.c
diff --git a/minimal-examples/server/minimal-ws-server-ring/CMakeLists.txt b/minimal-examples/server-ws/minimal-ws-server-ring/CMakeLists.txt
similarity index 100%
rename from minimal-examples/server/minimal-ws-server-ring/CMakeLists.txt
rename to minimal-examples/server-ws/minimal-ws-server-ring/CMakeLists.txt
diff --git a/minimal-examples/server/minimal-ws-server-ring/README.md b/minimal-examples/server-ws/minimal-ws-server-ring/README.md
similarity index 100%
rename from minimal-examples/server/minimal-ws-server-ring/README.md
rename to minimal-examples/server-ws/minimal-ws-server-ring/README.md
diff --git a/minimal-examples/server/minimal-ws-server-ring/minimal-ws-server.c b/minimal-examples/server-ws/minimal-ws-server-ring/minimal-ws-server.c
similarity index 100%
rename from minimal-examples/server/minimal-ws-server-ring/minimal-ws-server.c
rename to minimal-examples/server-ws/minimal-ws-server-ring/minimal-ws-server.c
diff --git a/minimal-examples/server-ws/minimal-ws-server-ring/mount-origin/favicon.ico b/minimal-examples/server-ws/minimal-ws-server-ring/mount-origin/favicon.ico
new file mode 100644
index 0000000000000000000000000000000000000000..c0cc2e3dff34012ba3d4a7848a7ed17579788ec5
Binary files /dev/null and b/minimal-examples/server-ws/minimal-ws-server-ring/mount-origin/favicon.ico differ
diff --git a/minimal-examples/server/minimal-ws-server-ring/mount-origin/index.html b/minimal-examples/server-ws/minimal-ws-server-ring/mount-origin/index.html
similarity index 100%
rename from minimal-examples/server/minimal-ws-server-ring/mount-origin/index.html
rename to minimal-examples/server-ws/minimal-ws-server-ring/mount-origin/index.html
diff --git a/minimal-examples/server-ws/minimal-ws-server-ring/mount-origin/libwebsockets.org-logo.png b/minimal-examples/server-ws/minimal-ws-server-ring/mount-origin/libwebsockets.org-logo.png
new file mode 100644
index 0000000000000000000000000000000000000000..2060a10c936a0959f2a5c3a6b7fa60ac324f1a95
Binary files /dev/null and b/minimal-examples/server-ws/minimal-ws-server-ring/mount-origin/libwebsockets.org-logo.png differ
diff --git a/minimal-examples/server/minimal-ws-server-ring/protocol_lws_minimal.c b/minimal-examples/server-ws/minimal-ws-server-ring/protocol_lws_minimal.c
similarity index 100%
rename from minimal-examples/server/minimal-ws-server-ring/protocol_lws_minimal.c
rename to minimal-examples/server-ws/minimal-ws-server-ring/protocol_lws_minimal.c
diff --git a/minimal-examples/server/minimal-ws-server-threads/CMakeLists.txt b/minimal-examples/server-ws/minimal-ws-server-threads/CMakeLists.txt
similarity index 100%
rename from minimal-examples/server/minimal-ws-server-threads/CMakeLists.txt
rename to minimal-examples/server-ws/minimal-ws-server-threads/CMakeLists.txt
diff --git a/minimal-examples/server/minimal-ws-server-threads/README.md b/minimal-examples/server-ws/minimal-ws-server-threads/README.md
similarity index 100%
rename from minimal-examples/server/minimal-ws-server-threads/README.md
rename to minimal-examples/server-ws/minimal-ws-server-threads/README.md
diff --git a/minimal-examples/server/minimal-ws-server-threads/minimal-ws-server.c b/minimal-examples/server-ws/minimal-ws-server-threads/minimal-ws-server.c
similarity index 100%
rename from minimal-examples/server/minimal-ws-server-threads/minimal-ws-server.c
rename to minimal-examples/server-ws/minimal-ws-server-threads/minimal-ws-server.c
diff --git a/minimal-examples/server-ws/minimal-ws-server-threads/mount-origin/favicon.ico b/minimal-examples/server-ws/minimal-ws-server-threads/mount-origin/favicon.ico
new file mode 100644
index 0000000000000000000000000000000000000000..c0cc2e3dff34012ba3d4a7848a7ed17579788ec5
Binary files /dev/null and b/minimal-examples/server-ws/minimal-ws-server-threads/mount-origin/favicon.ico differ
diff --git a/minimal-examples/server/minimal-ws-server-threads/mount-origin/index.html b/minimal-examples/server-ws/minimal-ws-server-threads/mount-origin/index.html
similarity index 100%
rename from minimal-examples/server/minimal-ws-server-threads/mount-origin/index.html
rename to minimal-examples/server-ws/minimal-ws-server-threads/mount-origin/index.html
diff --git a/minimal-examples/server-ws/minimal-ws-server-threads/mount-origin/libwebsockets.org-logo.png b/minimal-examples/server-ws/minimal-ws-server-threads/mount-origin/libwebsockets.org-logo.png
new file mode 100644
index 0000000000000000000000000000000000000000..2060a10c936a0959f2a5c3a6b7fa60ac324f1a95
Binary files /dev/null and b/minimal-examples/server-ws/minimal-ws-server-threads/mount-origin/libwebsockets.org-logo.png differ
diff --git a/minimal-examples/server/minimal-ws-server-threads/protocol_lws_minimal.c b/minimal-examples/server-ws/minimal-ws-server-threads/protocol_lws_minimal.c
similarity index 100%
rename from minimal-examples/server/minimal-ws-server-threads/protocol_lws_minimal.c
rename to minimal-examples/server-ws/minimal-ws-server-threads/protocol_lws_minimal.c
diff --git a/minimal-examples/server/minimal-ws-server/CMakeLists.txt b/minimal-examples/server-ws/minimal-ws-server/CMakeLists.txt
similarity index 100%
rename from minimal-examples/server/minimal-ws-server/CMakeLists.txt
rename to minimal-examples/server-ws/minimal-ws-server/CMakeLists.txt
diff --git a/minimal-examples/server/minimal-ws-server/README.md b/minimal-examples/server-ws/minimal-ws-server/README.md
similarity index 100%
rename from minimal-examples/server/minimal-ws-server/README.md
rename to minimal-examples/server-ws/minimal-ws-server/README.md
diff --git a/minimal-examples/server/minimal-ws-server/minimal-ws-server.c b/minimal-examples/server-ws/minimal-ws-server/minimal-ws-server.c
similarity index 100%
rename from minimal-examples/server/minimal-ws-server/minimal-ws-server.c
rename to minimal-examples/server-ws/minimal-ws-server/minimal-ws-server.c
diff --git a/minimal-examples/server-ws/minimal-ws-server/mount-origin/favicon.ico b/minimal-examples/server-ws/minimal-ws-server/mount-origin/favicon.ico
new file mode 100644
index 0000000000000000000000000000000000000000..c0cc2e3dff34012ba3d4a7848a7ed17579788ec5
Binary files /dev/null and b/minimal-examples/server-ws/minimal-ws-server/mount-origin/favicon.ico differ
diff --git a/minimal-examples/server/minimal-ws-server/mount-origin/index.html b/minimal-examples/server-ws/minimal-ws-server/mount-origin/index.html
similarity index 100%
rename from minimal-examples/server/minimal-ws-server/mount-origin/index.html
rename to minimal-examples/server-ws/minimal-ws-server/mount-origin/index.html
diff --git a/minimal-examples/server-ws/minimal-ws-server/mount-origin/libwebsockets.org-logo.png b/minimal-examples/server-ws/minimal-ws-server/mount-origin/libwebsockets.org-logo.png
new file mode 100644
index 0000000000000000000000000000000000000000..2060a10c936a0959f2a5c3a6b7fa60ac324f1a95
Binary files /dev/null and b/minimal-examples/server-ws/minimal-ws-server/mount-origin/libwebsockets.org-logo.png differ
diff --git a/minimal-examples/server/minimal-ws-server/protocol_lws_minimal.c b/minimal-examples/server-ws/minimal-ws-server/protocol_lws_minimal.c
similarity index 100%
rename from minimal-examples/server/minimal-ws-server/protocol_lws_minimal.c
rename to minimal-examples/server-ws/minimal-ws-server/protocol_lws_minimal.c