    # File lib/phusion_passenger/standalone/app_finder.rb, line 44
            def scan
                    apps = []
                    watchlist = []

                    app_root = find_app_root
                    apps << {
                            :server_names => ["_"],
                            :root => app_root
                    }
                    watchlist << app_root
                    watchlist << "#{app_root}/config" if File.exist?("#{app_root}/config")
                    watchlist << "#{app_root}/passenger.conf" if File.exist?("#{app_root}/passenger.conf")

                    apps.sort! do |a, b|
                            a[:root] <=> b[:root]
                    end
                    apps.map! do |app|
                            config_filename = File.join(app[:root], "passenger.conf")
                            if File.exist?(config_filename)
                                    local_options = load_config_file(:local_config, config_filename)
                                    merged_options = @options.merge(app)
                                    merged_options.merge!(local_options)
                                    merged_options
                            else
                                    @options.merge(app)
                            end
                    end

                    @apps = apps
                    @watchlist = watchlist
                    return apps
            end