The relationship between the mechanisms that control an organism's lifespan and its ability to respond to environmental challenges are poorly understood. In Caenorhabditis elegans, an insulin-like signaling pathway modulates lifespan and the innate immune response to bacterial pathogens via a common mechanism involving transcriptional regulation by the DAF-16/FOXO transcription factor. The C. elegans germ line also modulates lifespan in a daf-16-dependent manner. Here, we show that the germ line controls the innate immune response of C. elegans somatic cells to two different Gram-negative bacteria. In contrast to the insulin-like signaling pathway, the germ line acts via distinct signaling pathways to control lifespan and innate immunity. Under standard nematode culture conditions, the germ line regulates innate immunity in parallel to a known p38 MAPK signaling pathway, via a daf-16-independent pathway. Our findings indicate that a complex regulatory network integrates inputs from insulin-like signaling, p38 MAPK signaling, and germ line stem cells to control innate immunity in C. elegans. We also confirm that innate immunity and lifespan in C. elegans are distinct processes, as nonoverlapping regulatory networks control survival in the presence of pathogenic and nonpathogenic bacteria. Finally, we demonstrate that the p38 MAPK pathway in C. elegans is activated to a similar extent by both pathogenic and nonpathogenic bacteria, suggesting that both can induce the nematode innate immune response.