code: public synchronized static void removeVirtualHost(VirtualHostConfig config) {
          if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) {
              Tr.event(tc, "Remove virtual host: " + config.getVirtualHost(), config, defaultHost.get(), alternateHostSelector);
          }
          if (config.isDefaultHost()) {
              defaultHost = StaticValue.mutateStaticValue(defaultHost, new Callable<VirtualHostConfig>() {
                  @Override
                  public VirtualHostConfig call() {
                      return null;
                  }
              });
              if (alternateHostSelector.get() != null) {
                  alternateHostSelector.get().alternateRemoveDefaultHost(config);
              } else {
                  // notify default host of  active listeners
                  for (HttpEndpointImpl e : HttpEndpointList.getInstance()) {
                      int ePort = e.getListeningHttpPort();
                      if (ePort > 0) {
                          config.listenerStopped(e, e.getResolvedHostName(), ePort, false);
                      }
  
                      ePort = e.getListeningSecureHttpPort();
                      if (ePort > 0) {
                          config.listenerStopped(e, e.getResolvedHostName(), ePort, true);
                      }
  
                  }
              }
          } else if (alternateHostSelector.get() != null) {
              // remove all configured host aliases.
              alternateHostSelector.get().alternateRemoveVirtualHost(config, config.getHostAliases());
          }
      }
docs: Remove a virtual host: called if a virtual host is deactivated or disabled
  
  @param config Virtual host configuration to remove
  
  @see VirtualHostImpl#modified(Map)
  @see VirtualHostImpl#deactivate(org.osgi.service.component.ComponentContext, int)