The results of acoustic investigations of the melting and crystallization of indium-gallium alloys of different compositions embedded in porous glass matrices with a pore size of 18 nm are presented. It was shown that the formation of the α and β crystalline modifications of gallium is possible depending on the alloy composition in nanopores. The fraction of β-Ga increased as the indium concentration in the alloy increased. Stabilization of β-Ga in conditions of confined geometry was revealed. Broadening of the melting region of the α phase of gallium and narrowing of the melting region of β-Ga, as compared with the corresponding bulk alloys, were observed.