# File lib_core/rucy/document.rb, line 550
    def publish(script_name, request, response, logger)
      script_name2, path = request.subpath(script_name)
      host = request.host
      host += ':80' if (host && host !~ /:\d+$/)
      if (@virtual_mount_map[host]) then
        alias_map = @virtual_alias_map[host] || EMPTY_MAP
        if (alias_map.include? path) then
          path = alias_map[path]
          request.path = script_name2 + path
        end
        if (doc_pair = search(@virtual_mount_map[host], path)) then
          document, mount_path = doc_pair
          document.publish(script_name2 + mount_path, request, response, logger)
        else
          logger.debug("[#{Time.now.httpdate}] not virtual mounted: http://#{host}#{request.path}")
          raise HTTPError.new(404) # Not Found
        end
      else
        if (@alias_map.include? path) then
          path = @alias_map[path]
          request.path = script_name2 + path
        end
        if (doc_pair = search(@mount_map, path)) then
          document, mount_path = doc_pair
          document.publish(script_name2 + mount_path, request, response, logger)
        else
          logger.debug("[#{Time.now.httpdate}] not mounted: #{request.path}")
          raise HTTPError.new(404) # Not Found
        end
      end

      nil
    end