I assume you mean "by" the front hub, not "on" the front hub, as if you actually mounted it on the front hub that would be...an interesting...strobe effect... :-D
Most dynamo lights are mounted at the top of the fork where the rim brakes attach - for the exact reason you describe. The ones I've seen mounted down by the hub always seem to come in a pair, one on one side and one of the other, also for the reasons you mention.