-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't figure out how to run Matomo from the package. #69
Comments
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:
So, I still can't figure out any way to get this application to run... |
Guessing what could be wrong without the above is going to be really hard for anyone. Thanks |
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):
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. |
So, for the record, instructions that I've been following: http://debian.piwik.org/ Finding these instructions in the README: https://github.com/matomo-org/matomo-package/blob/master/debian/README.Debian |
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... |
Small hints hoping they could be useful: The canonical way to change stuff like e.g. something like this:
(adapted from the NixOS package I maintain, so I can't give you specific info on this Debian package) Also, the |
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. |
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. |
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 |
Accessing the site is giving me:
Obviously, the server is not running as root, so it cannot write to these directories. But, I don't want it to write to /usr/share/ anyway.
Looking at index.php, it appears to define the paths with no way for me to customise them. Presumably, I need to set PIWIK_DOCUMENT_ROOT to /var/www/mysite/ and PIWIK_INCLUDE_PATH to /usr/share/matomo/.
Is there something I'm missing that would allow me to change these paths?
I'm using nginx if it makes a difference.
The text was updated successfully, but these errors were encountered: