Let Omega be a smooth bounded domain in R-N. We consider the logistic equation Deltau + au = b(x)f(u) in Omega, where a is a real number, b is continuous, b greater than or equal to 0, b not equivalent to 0, and f is an element of C-1 is a positive function satisfying the Keller-Osserman condition and such that f(u)/u is increasing on (0, infinity). We prove that a necessary and sufficient condition for the existence of a positive solution blowing-up at the boundary of Omega is that a is an element of (-infinity, lambda(infinity),(1)), where lambda(infinity),(1) is the first eigenvalue of (-Delta) in H-0(1)(Omega(0)) and Omega(0) = int {x is an element of Omega; b(x) = 0}. Our framework includes the case when the potential b vanishes at some points on partial derivativeOmega or even on the whole boundary.