If $X$ has the so-called Wiener-regularityWiener-regularity, then it generates an analytic semigroup, see the paper by Arendt and BenilanBénilan.
The paper shows this even for unbounded domains, along with the fact that if the regularity assumption is not satisfied, then the Dirichlet-Laplace operator has empty resolvent (hence it is not even a semigroup generator).
For bounded domains and well-posedness (=semigroup generation), see Gilbarg-Trudinger, Section 2.8.