Comet McNaught brightened dramatically during two outbursts around perihelion as it made a close approach to the sun.