Source:
<code>private Collection<? extends ModelNode> replaceUndertowWithWeb(final PathAddress subsystem) { final List<ModelNode> list = new ArrayList<>(); <START> list.add(createRemoveOperation(subsystem.getParent().append(SUBSYSTEM, "modcluster"))); <END> list.add(createRemoveOperation(subsystem)); list.add(createRemoveOperation(PathAddress.pathAddress(EXTENSION, "org.wildfly.extension.undertow"))); list.add(createAddOperation(PathAddress.pathAddress(EXTENSION, "org.jboss.as.web"))); final PathAddress web = subsystem.getParent().append(SUBSYSTEM, "web"); final ModelNode addWeb = Util.createAddOperation(web); addWeb.get("default-virtual-server").set("default-host"); addWeb.get("native").set("false"); list.add(addWeb); list.add(createAddOperation(web.append("configuration", "container"))); list.add(createAddOperation(web.append("configuration", "static-resources"))); list.add(createAddOperation(web.append("configuration", "jsp-configuration"))); ModelNode addHttp = Util.createAddOperation(web.append("connector", "http")); addHttp.get("protocol").set("HTTP/1.1"); addHttp.get("scheme").set("http"); addHttp.get("socket-binding").set("http"); list.add(addHttp); ModelNode addAjp = Util.createAddOperation(web.append("connector", "ajp")); addAjp.get("protocol").set("AJP/1.3"); addAjp.get("scheme").set("http"); addAjp.get("socket-binding").set("ajp"); list.add(addAjp); ModelNode addVirtualServer = Util.createAddOperation(web.append("virtual-server", "default-host")); addVirtualServer.get("enable-welcome-root").set(true); addVirtualServer.get("alias").add("localhost").add("example.com"); list.add(addVirtualServer); return list; }</code><technical_language>This discussed implies mod_cluster longer work in a profile meant for 6.x hosts</technical_language>

Target:
private Collection<? extends ModelNode> replaceUndertowWithWeb(final PathAddress subsystem) { final List<ModelNode> list = new ArrayList<>(); list.add(createAddOperation(PathAddress.pathAddress(EXTENSION, "org.jboss.as.web"))); ModelNode compositeOp = Util.getEmptyOperation(COMPOSITE, new ModelNode()); final ModelNode steps = compositeOp.get(STEPS); steps.add(createRemoveOperation(subsystem)); final PathAddress web = subsystem.getParent().append(SUBSYSTEM, "web"); final ModelNode addWeb = Util.createAddOperation(web); addWeb.get("default-virtual-server").set("default-host"); addWeb.get("native").set("false"); steps.add(addWeb); steps.add(createAddOperation(web.append("configuration", "container"))); steps.add(createAddOperation(web.append("configuration", "static-resources"))); steps.add(createAddOperation(web.append("configuration", "jsp-configuration"))); ModelNode addHttp = Util.createAddOperation(web.append("connector", "http")); addHttp.get("protocol").set("HTTP/1.1"); addHttp.get("scheme").set("http"); addHttp.get("socket-binding").set("http"); steps.add(addHttp); ModelNode addAjp = Util.createAddOperation(web.append("connector", "ajp")); addAjp.get("protocol").set("AJP/1.3"); addAjp.get("scheme").set("http"); addAjp.get("socket-binding").set("ajp"); steps.add(addAjp); ModelNode addVirtualServer = Util.createAddOperation(web.append("virtual-server", "default-host")); addVirtualServer.get("enable-welcome-root").set(true); addVirtualServer.get("alias").add("localhost").add("example.com"); steps.add(addVirtualServer); list.add(compositeOp); list.add(createRemoveOperation(PathAddress.pathAddress(EXTENSION, "org.wildfly.extension.undertow"))); return list; }