In his book Global Calculus, S. Ramanan defines modules over a sheaf of algebras. He demands the abelian group $\mathcal{M}(U)$ to be provided with the structure of $\mathcal{A}(U)$-module for every open $U$. Note that here $\mathcal{A}$ is a sheaf of algebras, not rings.
Strangely enough, I could not find the definition of ‘module over algebra’. Everything I came up with was the following:
If algebra $A$ over $R$ is a homomorphism $R\longrightarrow A$ of commutative rings, and module $M$ over ring $A$ is a homomorphism $A \longrightarrow \mathop{\mathrm{End}} M$ in the same category, then module over algebra should be an arrow from $R\longrightarrow A$ to $R\longrightarrow \mathop{\mathrm{End}} M$ (an arrow between objects under $R$),
but the homomorphism $R\longrightarrow \mathop{\mathrm{End}} M$ is not given, unless $M$ is already an $R$-module (mostly a real vector space, for $\mathcal{A}$ is usually a sheaf of $\mathbb{R}$-algebras of differentiable functions).
How should I think of modules over algebras in this context? Is there a common definition?