A cytochrome P450 monooxygenase involved in the metabolism of endogenous oxysterols and steroid hormones, including neurosteroids (PubMed:9295351, PubMed:9144166, PubMed:10748047, PubMed:11067870). Mechanistically, uses molecular oxygen inserting one oxygen atom into a substrate, and reducing the second into a water molecule, with two electrons provided by NADPH via cytochrome P450 reductase (CPR; NADPH-ferrihemoprotein reductase). Catalyzes the hydroxylation of carbon hydrogen bonds of steroids with a preference for 7-alpha position. Usually metabolizes steroids carrying a hydroxy group at position 3, functioning as a 3-hydroxy steroid 7-alpha hydroxylase (PubMed:9295351, PubMed:9144166, PubMed:10748047, PubMed:11067870). Hydroxylates oxysterols, including 25-hydroxycholesterol and (25R)-cholest-5-ene-3beta,26-diol toward 7-alpha hydroxy derivatives, which may be transported to the liver and converted to bile acids (PubMed:9295351, PubMed:9144166, PubMed:10748047, PubMed:11067870). Via its product 7-alpha,25-dihydroxycholesterol, a ligand for the chemotactic G protein-coupled receptor GPR183/EBI2, regulates B cell migration in germinal centers of lymphoid organs, thus guiding efficient maturation of plasma B cells and overall antigen-specific humoral immune response (PubMed:22999953). 7-alpha hydroxylates neurosteroids, including 3beta-hydroxyandrost-5-en-17-one (dehydroepiandrosterone) and pregnenolone, both involved in hippocampus-associated memory and learning (PubMed:9144166). Metabolizes androstanoids toward 6- or 7-alpha hydroxy derivatives (By similarity). 25-hydroxycholesterol + O2 + reduced [NADPH--hemoprotein reductase] = 7alpha,25-dihydroxycholesterol + H(+) + H2O + oxidized [NADPH--hemoprotein reductase] (25R)-cholest-5-ene-3beta,26-diol + O2 + reduced [NADPH--hemoprotein reductase] = (25R)-cholest-5-en-3beta,7alpha,26-triol + H(+) + H2O + oxidized [NADPH--hemoprotein reductase] (24S)-hydroxycholesterol + O2 + reduced [NADPH--hemoprotein reductase] = (24S)-7alpha-dihydroxycholesterol + H(+) + H2O + oxidized [NADPH--hemoprotein reductase] (24S)-25-epoxycholesterol + O2 + reduced [NADPH--hemoprotein reductase] = (24S,25)-epoxy-7alpha-hydroxycholesterol + H(+) + H2O + oxidized [NADPH--hemoprotein reductase] (22R)-hydroxycholesterol + O2 + reduced [NADPH--hemoprotein reductase] = (22R,7alpha)-dihydroxycholesterol + H(+) + H2O + oxidized [NADPH--hemoprotein reductase] androst-5-en-3beta,17beta-diol + O2 + reduced [NADPH--hemoprotein reductase] = androst-5-en-3beta,7alpha,17beta-triol + H(+) + H2O + oxidized [NADPH--hemoprotein reductase] 5alpha-androstane-3beta,17beta-diol + O2 + reduced [NADPH--hemoprotein reductase] = 5alpha-androstane-3beta,6alpha,17beta-triol + H(+) + H2O + oxidized [NADPH--hemoprotein reductase] 3beta-hydroxyandrost-5-en-17-one + O2 + reduced [NADPH--hemoprotein reductase] = 3beta,7alpha-dihydroxyandrost-5-en-17-one + H(+) + H2O + oxidized [NADPH--hemoprotein reductase] 3beta-hydroxy-5alpha-androstan-17-one + O2 + reduced [NADPH--hemoprotein reductase] = 3beta,7alpha-dihydroxy-5alpha-androstan-17-one + H(+) + H2O + oxidized [NADPH--hemoprotein reductase] O2 + pregnenolone + reduced [NADPH--hemoprotein reductase] = 7alpha-hydroxypregnenolone + H(+) + H2O + oxidized [NADPH--hemoprotein reductase] Inhibited by drugs voriconazole and metyrapone. Lipid metabolism; bile acid biosynthesis. Steroid hormone biosynthesis. Highly expressed in brain structures including the corpus callosum, the anterior commissure and fornix (PubMed:8530364). The hippocampal expression is particularly prominent in the dentate gyrus (PubMed:8530364). Expressed in liver and kidney. The hepatic expression is sexually dimorphic, predominantly detected in male liver while barely detectable in females (PubMed:8530364). Expressed in lymph nodes and spleens, in both lymphoid and stromal compartments (PubMed:22999953). Higher expression is detected in fibroblastic reticular cells, a type of stromal cells in the lymph nodes (PubMed:22999953). Also expressed at high levels in the outer follicle and at the B cell-T cell boundary of splenic germinal centers (PubMed:22999953). Expressed in dendritic cells (DCs) subpopulations being most abundant in CD8-positive DCs (PubMed:22999953). Knockout mice exhibit impaired generation of plasma cells and overall deficient antigen-specific humoral immune response. Belongs to the cytochrome P450 family.