Headache every time I have exams at uni so what is the solution for headache due to stress while Advil (ibuprofen) and other calming medication doesnt work?

Calming techniques. Stress is more of a perceived problem, than an actual illness, so the phrase 'mind over matter' really applies here ! When you feel a tension headache coming on, the best thing to do is take yourself away from the stressful stimulus, take some deep breaths, visualize a calm environment or something that really makes you happy or relaxes you, and the stress will melt away. Try it !