Although non-Markovian processes are considerably more complicated to analyze, real-world epidemics are likely non-Markovian, because the infection time is not always exponentially distributed. Here, we present analytic expressions of the epidemic threshold in a Weibull and a Gamma SIS epidemic on any network, where the infection time is Weibull, respectively, Gamma, but the recovery time is exponential. The theory is compared with precise simulations. The mean-field non-Markovian epidemic thresholds, both for a Weibull and Gamma infection time, are physically similar and interpreted via the occurrence time of an infection during a healthy period of each node in the graph. Our theory couples the type of a viral item, specified by a shape parameter of the Weibull or Gamma distribution, to its corresponding network-wide endemic spreading power, which is specified by the mean-field non-Markovian epidemic threshold in any network.