Mix equal parts white vinegar and water in a spray bottle. Spray directly on stain, let sit for several minutes, and clean with a brush or sponge using warm soapy water.
For a heavy duty carpet cleaner, mix 1/4 cup each of salt, borax and vinegar. Rub paste into carpet and leave for a few hours. Vacuum.