We present an ambient refractive index (RI) insensitive temperature sensor based on a Silicon-on-Insulator (SOI) ellipse stack major axis modulated photonic crystal (PC) nanobeam cavity (EPCNC). The PC nanobeam cavity is covered with SU-8 cladding to increase the temperature sensitivity by taking advantage of the relatively high thermooptic (TO) coefficient of SU-8 cladding. Three dimensional finite-difference time-domain (3D-FDTD) simulations are used for our analysis. The results show that the sensitivity of temperature sensing is -108.9pm/K. In particular, the proposed sensor not only achieves a competitive temperature sensitivity, but also eliminates the influence of ambient RI on sensing. Therefore, the proposed sensor is potentially a promising platform for future application of temperature sensing.