Comments (9)
OK, I've now tried hacking the index.php file to get something working temporarily, and set PIWIK_DOCUMENT_ROOT to /var/www/mysite, PIWIK_INCLUDE_PATH to /usr/share/matomo, and PIWIK_USER_PATH to /etc/matomo.
However, I now get this error:
Matomo encoutered an error: An exception has been thrown during the rendering of a template ("The ui asset with 'href' = /var/www/mysite/plugins/Morpheus/stylesheets/base/bootstrap.css is not readable"). (which lead to: SQLSTATE[HY000] [1045] Access denied for user ''@'localhost' (using password: NO))
So, I still can't figure out any way to get this application to run...
from matomo-package.
- Don't hack
index.php
. I mean, that's not going to help you in any way. - Could you provide more details on how you are trying to install Matomo
- Could you provide more information about your environment
- Could you provide your nginx configuration related to Matomo
Guessing what could be wrong without the above is going to be really hard for anyone.
Thanks
from matomo-package.
Well, I was more looking for a general idea of how someone is supposed to run/install it. Based on the instructions, I have installed the package, and then setup a database. From there, I can't seem to find any clear instructions on how this is supposed to be configured/run (obviously there is an Apache config in the package, but that doesn't seem to be helping me figure it out).
Here's one version of my nginx conf (I've tried a couple of different approaches):
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name mysite;
root /usr/share/matomo;
include fastcgi.conf;
location / {
try_files $uri @var;
}
location @var {
root /var/www/mysite;
try_files $uri /index.php?$query_string;
}
location = /index.php {
fastcgi_pass php;
}
}
For comparison, to understand what I am expecting to do, if you install the wordpress package, it comes with a custom config.php which automatically loads individual site configs from /etc/wordpress/, and then in that site config, you would define WP_CONTENT_DIR as /var/www/mysite/. That way, everything just works by getting nginx to run WordPress from /usr/share/wordpress/ and WordPress automatically loads plugins/themes etc. through the /var directory.
Literally everything I've tried seems to result in Matomo wanting me to allow it write access to /usr/share/matomo/ and to run everything from there.
from matomo-package.
So, for the record, instructions that I've been following: http://debian.piwik.org/
After installing the package, it says 'Check the configuration files in /etc/matomo/'.
No information on what I should be checking or what I might want to change. And, that's the end of those instructions, so I have no information on how I might run the project.
Finding these instructions in the README: https://github.com/matomo-org/matomo-package/blob/master/debian/README.Debian
That asks me to setup a database.
Then adds an Apache config.
But, as far as I can tell that config is just telling it to run through /usr/share/matomo/ which is what I've tried, and keeps giving me errors because it's not writeable.
from matomo-package.
I'm still rather lost, any hints on how it's supposed to work would be great. The only way I can imagine at this point is using some kind of overlayfs setup, using /usr/share/matomo as a read-only layer and then having a writeable layer on top of that.
Other than that, I'm completely lost as to how someone is supposed to run Matomo from this package...
from matomo-package.
Small hints hoping they could be useful: The canonical way to change stuff like PIWIK_USER_PATH
is a bootstrap.php
file, see https://matomo.org/docs/include-piwik-in-your-project/#bootstrap-php-execute-custom-code-before-matomo-runs for more info. That way, you don't have to modify index.php
.
e.g. something like this:
<?php
// set PIWIK_USER_PATH to a writable location
define('PIWIK_USER_PATH', '/var/www/mysite');
(adapted from the NixOS package I maintain, so I can't give you specific info on this Debian package)
Also, the @var
location should be removed, as none of the files in PIWIK_USER_PATH
are intended to be served to users through the web server, they're only config and tmp files, read / writte by the php scripts in the /usr
location.
from matomo-package.
Thanks so much @florianjacob, that gets it working.
@aureq Looking at how the package installs, I'm guessing the Debian package intends everything to be run out of /etc/matomo, rather than a /var/www/ site. However, without me adding the bootstrap.php file, it will only try to run from /usr/share/matomo. Obviously, manually adding bootstrap.php is another hack, so it seems to me that the package is missing this file, which should be hardcoded to /etc/matomo (if that's how the Debian package is meant to be run), or otherwise include a file from /etc/matomo/ to allow the user to customise the path.
from matomo-package.
Another error now, when downloading the geoip2 databases; it wants to save them to /usr/share/matomo/misc/. So, either Matomo should be tweaked to download them somewhere under the user_path, or if it must use that location, then that directory should be a symlink to somewhere in the user_path.
from matomo-package.
Thanks for your patience, let's continue the discussion in this other issue for now, where we're looking for a new maintainer for the debian package: #131
from matomo-package.
Related Issues (20)
- Smaller release file (remove not needed files from release) HOT 2
- Do not prepend autoloader HOT 1
- Package for 3.15.5 HOT 3
- On upgrade "The Matomo JavaScript tracker file "/matomo.js" & "/piwik.js" is not writable" HOT 2
- No debian package since 3.13.6 HOT 17
- Automate the packaging of Matomo beta/rc/stable releases via Github actions HOT 6
- Remove the WAG build from the script
- Releasing Matomo 4.0 for Debian HOT 13
- Don't include JS test files in the release
- Exclude phpcs.xml from release package
- Is the Matomo Debian package dead? HOT 72
- Working on debian package generation: .eslintrc ? HOT 1
- Working on debian package generation: autoload.php HOT 1
- Manifest / Integrity check has issues with symlinks HOT 2
- Changes in website format prevents pulling changelog when generating Debian package HOT 8
- Matomo 3.8.1 update? HOT 9
- libmaxminddb recommendations HOT 22
- matomo.php and matomo.js are missing from debian package HOT 1
- Security / Policy breach /usr/share/matomo/misc/user HOT 6
- Debian stretch (Matomo will stop supporting PHP 7.0 in the next major version.) HOT 17
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from matomo-package.