We discuss the use of one-nucleon removal reactions of loosely bound nuclei at intermediate energies as an indirect method in nuclear astrophysics. The breakup reactions are proved to be good spectroscopic tools and can be used to study a large number of loosely bound proton- or neutron-rich nuclei over a wide range of beam energies. As peripheral processes, they can be used to extract asymptotic normalization coefficients (ANCs) from which non-resonant capture reaction rates of astrophysical interest can be calculated parameter free. In this talk, we present results of a proton-breakup experiment carried out at GANIL (France) with a cocktail beam centered around 23Al at 50 MeV/nucleon. Momentum distributions of the breakup fragments, inclusive and in coincidence with gamma rays detected by EXOGAM Germanium clover array, were measured in the focal plan of SPEG energy-loss spectrometer. We present in particular the investigations of reaction rates for 22Mg(p,γ) 23Al and 23Al(p,γ)24Si important for novae and X-ray bursts, respectively.