Index: /binary-improvements2/WebServer/src/Web.cs
===================================================================
--- /binary-improvements2/WebServer/src/Web.cs	(revision 411)
+++ /binary-improvements2/WebServer/src/Web.cs	(revision 412)
@@ -21,5 +21,5 @@
 		private readonly List<AbsHandler> handlers = new List<AbsHandler> ();
 		public readonly List<WebMod> webMods = new List<WebMod> ();
-		private readonly ConnectionHandler connectionHandler;
+		public readonly ConnectionHandler ConnectionHandler;
 
 		private readonly HttpListener listener = new HttpListener ();
@@ -30,12 +30,15 @@
 		public Web (string _modInstancePath) {
 			try {
-				int webPort = GamePrefs.GetInt (EnumUtils.Parse<EnumGamePrefs> (nameof (EnumGamePrefs.ControlPanelPort)));
+				bool dashboardEnabled = GamePrefs.GetBool (EnumUtils.Parse<EnumGamePrefs> (nameof (EnumGamePrefs.WebDashboardEnabled)));
+				if (!dashboardEnabled) {
+					Log.Out ($"[Web] Webserver not started, {nameof (EnumGamePrefs.WebDashboardEnabled)} set to false");
+					return;
+				}
+				
+				int webPort = GamePrefs.GetInt (EnumUtils.Parse<EnumGamePrefs> (nameof (EnumGamePrefs.WebDashboardPort)));
 				if (webPort < 1 || webPort > 65533) {
-					Log.Out ("[Web] Webserver not started (ControlPanelPort not within 1-65533)");
-					return;
-				}
-
-				// TODO: Remove once this becomes the default control panel
-				webPort += 2;
+					Log.Out ($"[Web] Webserver not started ({nameof (EnumGamePrefs.WebDashboardPort)} not within 1-65535)");
+					return;
+				}
 
 				if (!HttpListener.IsSupported) {
@@ -44,11 +47,14 @@
 				}
 
+				if (string.IsNullOrEmpty (GamePrefs.GetString (EnumUtils.Parse<EnumGamePrefs> (nameof (EnumGamePrefs.WebDashboardUrl))))) {
+					Log.Warning ($"[Web] {nameof (EnumGamePrefs.WebDashboardUrl)} not set. Recommended to set it to the public URL pointing to your dashboard / reverse proxy");
+				}
+
 				// TODO: Read from config
-				bool useStaticCache = false;
+				bool useCacheForStatic = StringParsers.ParseBool ("false");
 
 				string webfilesFolder = DetectWebserverFolder (_modInstancePath);
-				string webfilesFolderLegacy = $"{_modInstancePath}/weblegacy";
-
-				connectionHandler = new ConnectionHandler ();
+
+				ConnectionHandler = new ConnectionHandler ();
 				
 				RegisterPathHandler ("/", new RewriteHandler ("/files/"));
@@ -57,20 +63,13 @@
 				RegisterPathHandler ("/app", new RewriteHandler ("/files/index.html", true));
 				
-				// Legacy web page
-				RegisterPathHandler ("/weblegacy", new StaticHandler (
-					webfilesFolderLegacy,
-					useStaticCache ? new SimpleCache () : new DirectAccess (),
-					false)
-				);
-				
 				// Do mods relatively early as they should not be requested a lot, unlike the later registrations, especially for API and map tiles
-				RegisterWebMods (useStaticCache);
-
-				RegisterPathHandler ("/session/", new SessionHandler (connectionHandler));
+				RegisterWebMods (useCacheForStatic);
+
+				RegisterPathHandler ("/session/", new SessionHandler (ConnectionHandler));
 				RegisterPathHandler ("/userstatus", new UserStatusHandler ());
 				RegisterPathHandler ("/sse/", new SseHandler ());
 				RegisterPathHandler ("/files/", new StaticHandler (
 					webfilesFolder,
-					useStaticCache ? new SimpleCache () : new DirectAccess (),
+					useCacheForStatic ? new SimpleCache () : new DirectAccess (),
 					false)
 				);
@@ -82,5 +81,4 @@
 
 				listener.Prefixes.Add ($"http://+:{webPort}/");
-				// listener.Prefixes.Add ($"http://[::1]:{webPort}/");
 				listener.Start ();
 				handleRequestDelegate = HandleRequest;
@@ -163,5 +161,5 @@
 
 		public void SendLine (string _line) {
-			connectionHandler.SendLine (_line);
+			ConnectionHandler.SendLine (_line);
 		}
 
@@ -299,5 +297,5 @@
 			
 			if (!string.IsNullOrEmpty (sessionId)) {
-				_con = connectionHandler.IsLoggedIn (sessionId, reqRemoteEndPoint.Address);
+				_con = ConnectionHandler.IsLoggedIn (sessionId, reqRemoteEndPoint.Address);
 				if (_con != null) {
 					int level1 = GameManager.Instance.adminTools.Users.GetUserPermissionLevel (_con.UserId);
