Let $D$ be a Dedekind domain in which $D/I$ is finite for any nonzero ideal $I$. Then we can define $N(I) = |D/I|$ and write down a Dedekind zeta function $$\zeta_D(s) = \sum_{I \neq 0} \frac{1}{N(I)^s}.$$
This specializes to the Riemann zeta function when $D = \mathbb{Z}$ and to the zeta function of an affine algebraic curve over a finite field when $D$ is its ring of functions. (The Dedekind domain hypothesis is in order to get an Euler product for this zeta function.)
To get the zeta function of a curve, not necessarily affine, we replace ideals with effective divisors, that is, non-negative formal integer linear combinations $$\sum n_i P_i, n_i \ge 0$$
of points of $C$ over $\overline{\mathbb{F}_q}$ which are $\text{Gal}(\overline{\mathbb{F}_q}/\mathbb{F}_q)$-invariant, and the appropriate replacement for the norm here is $q^{\sum n_i}$. This reduces to the above description in the case of an affine curve.