'Where do you study?' is fine. There's no problem at all with this question.
I take your point about 'Where do you go to school?'. If you analyse the construction, you would expect the last word to be a verb, as in 'Where do you go to eat?'. But it isn't a verb. School is a noun here. It's maybe a little illogical, but it is what we say, and native speakers don't tend to analyse things quite as thoroughly as some foreign learners do. In fact, you make us look at our language more closely than we'd ever normally do!
In British English you'd only say 'Where do you go to school?' to someone under 16, or 18 at the most. For anyone older than that, you'd say 'Where do you study?' , and they'd then tell you the name of their college or university. In American English 'school' is also used to refer to college/university level education.