Dow rallies to close higher, but Apple drags down Nasdaq