Once you feel the symptoms of the viral disease (diarrhea, vomiting, headache and fever), stop eating anything. Let the stomach settle down. Take rest and do not move much because you will already be exhausted with the vomiting and diarrhea.
Your main aim during the disease should be to keep yourself hydrated because you lose a lot of moisture and minerals due to the diarrhea and the vomiting. You need to replace them as much as you can. Get electrolytes and fluid replacement solutions from the market or drug stores and take in as much as you can. Of course, water is the best replacement solution itself. Do not drink fruit juices because they have high sugar content which can worsen diarrhea.
Make Oral rehydration solution (ORS) home and drink in as much as you can, at regular small intervals. The ORS will restore the lost hydration and minerals and is widely recommended by doctors, It is easily available in drug stores. Keep the prepared bottle of ORS near your bed and sip regularly. Use clean boiled water for preparing the solution.
Once your stomach is a bit settled, you can go back to eating small amounts of food. Things like Cereals, bread, potatoes, lean meat, Plain yogurt, bananas, fresh apples, Vegetables can be eaten safely in small amounts initially. Do not give your stomach any reason to start all over again. Take great care of hygienic conditions during this process because unhygienic ones increase the contamination. If you are contaminated, keep others around you safe by reducing contact through food and utensil sharing.