This paper investigates the problem of secure communication in the unmanned aerial vehicle (UAV) enabled net-works aided by a reconfigurable intelligent surface (RIS) from the physical layer security perspective. Specifically, the RIS is deployed to assist the wireless transmission from the UAV to the ground user in the presence of an eavesdropper. The objective of this work is to maximize the secrecy rate by jointly optimizing the phase shifts at the RIS as well as the transmit beamforming vector and location of the UAV. However, the formulated problem is difficult to solve directly due to the non-linear and non-convex objective function and constraints. By invoking the successive convex approximation and fractional programming techniques, the intractable original problem is transformed into convex ones, then an alternating algorithm is proposed to solve the challenging problem effectively. Simulations results demonstrate that the designed algorithm for RIS-aided UAV communications can achieve higher secrecy rate than benchmarks.