Black coffee & green tea can easily leave you dehydrated (which often manifests itself as a headache) and you might well be screwing up your electrolyte levels.
I agree with recommendation to stop this fast and see if you actually have a virus/ cold.
Try again in 1 week and be careful about salts & water levels.
If you are running a fever, it “could” be the flu.
However, one of the side effects of fasting is that your body is ridding itself of toxins, which is a good thing. People react differently to fasting…I personally experienced having a more frequent runny nose…so I increased my nasal washing to help.
Take note of the duration of what you’re experiencing as well as if anything changes that are impacting you in a less desirable way…if it continues, reach out to your healthcare professional.