  We construct infinite new classes of supersymmetric solutions of D=11
supergravity that are warped products of AdS_3 with an eight-dimensional
manifold M_8 and have non-vanishing four-form flux. In order to be compact, M_8
is constructed as an S^2 bundle over a six-dimensional manifold B_6 which is
either K\"ahler-Einstein or a product of K\"ahler-Einstein spaces. In the
special cases that B_6 contains a two-torus, we also obtain new AdS_3 solutions
of type IIB supergravity, with constant dilaton and only five-form flux. Via
the AdS-CFT correspondence the solutions with compact M_8 will be dual to
two-dimensional conformal field theories with N=(0,2) supersymmetry. Our
construction can also describe non-compact geometries and we briefly discuss
examples in type IIB which are dual to four-dimensional N=1 superconformal
theories coupled to string-like defects.
