Gravity from entanglement for boundary subregions