There is a proper location.
There is a standard for proper filesystem structure. Its current version has been around for over a decade, which might be news to some Linux distros.
The latest version of the Filesystem Hierarchy Standard is 2.3:
There, under the "Purpose" section of
var, it explains why that's a bad idea to use
Several directories are `reserved' in the sense that they must not be used arbitrarily by some new application, since they would conflict with historical and/or local practice. They are:
The proper place would be, dependent on the application and its usage, something like:
(I say "something like" because whether you use
/var/opt is dependent on the application, its role within the system, and how it was installed. Also, the structure under
/var/lib/<app> is arbitrary based on the application maintainers.)
By the way, since you mentioned it,
/var/www is not the proper place for served web pages (again, this is news to some distro and package maintainers, but the FHS is older that many of them who clearly never have read it). Served content, and stored application data/assets for services belong under the
/srv directory. I have been using the protocol method since 2005 and find it works quite well (
Let's say that that you are using
rsync and that this machine is providing a backup service for the network, you would use:
Version 3.0 of FHS: