The Hasse-Weil zeta function is defined only for arithmetic schemes. By an arithmetic scheme I will mean a scheme $X$ together with a morphism of finite type $X\rightarrow S$, where $S$ is an affine Dedekind scheme (a $0$ or $1$ dimensional nonsingular affine scheme). Actually, in the case where $S$ is $0$-dimensional, I believe it is only defined for $S$ being $Spec$ of a finite field.
The way the Hasse-Weil zeta function is defined is like so: first you define it for varieties over finite fields, and then if $S$ is one dimensional, you define the zeta function as the product of the zeta function of every fiber.
It seems rather arbitrary for it to be defined only in these cases. Is there a definition of a zeta function of a morphism of finite type (or maybe flat?) in general, even when $S$ is $\geq 2$ dimensional? I would be surprised if there isn't, but I've never heard of such an entity.