Hello,
i have a domain where i want to use matomo… my provider still charges me for SSL certificates so i want to install Matomo under domain.xyz/s/ instead of matomo.domain.xyz
Actually it is a bit more complex because i installed Matomo on my webserver under /websites/matomo/ and then i used .htaccess to simulate a directory that is an proxy to the main directory of Matomo (which should be accessable by several domains)
This kind of works but i wonder if this is a nice way…
its not working for the “opt out”-Cookie in my privacy policy because the cookie is set to the path /s instead of just / (EDIT: probably no problem because it only matters to matomo on /s…)
I would like to help you, but cannot do so until I have determined that your problem is similar to the one that I recently overcame with a simple upgrade of my PHP version.
Please provide the following full URL information:
Where is Matomo currently installed?
Where is the website that Matomo tracks currently installed?
To what new location would you like to install Matomo?
In order to help you with your answer:
domain.xyz is a domain name domain.xyz/websites/matomo is a directory path that includes the domain name
Roddy
p.s. To the best of my knowledge ( I am not certain about this) a subdomain is little more that a different way to write a director path. In other words, although treated differently matomo.domain.xyz and domain.xyz/matomo are located in the same place – namely, domain.xyz/matomo.
Off-Topic, but I could reproduce it. I think the fact that there is an URL to an invlid TLD trips discourse.
Maybe try using .example or example.com for placeholder URLs.
OK. Putting aside your simulated directory for the moment it is now clear that your Matomo and web- applications lie in the same directory path – namely, /websites. Thus communication with the Matomo application using PHP should not be a problem. Now, please allow me to ask what version of PHP you are using?
All i wanted is to have matomo in one directory on my server for several projects - and not to buy another ssl-certificate… but i think this does not work…
Maybe I am misunderstanding your use case, but what do you need any kind of RewriteRules for?
Shouldn’t it be enough to drop it into a matomo-folder, setting it up and just using https://yourdomain.example/matomo/ as an Matomo URL?
This shouldn’t need any kind of setup and as long as you don’t have anything in your root .htaccess that contradicts anything Matomo needs, everything should work.
it is really strange.
i now installed matomo under domain.example/matomo…
in order to not show the name “matomo” in the tracking script i put a redirect in my .htaccess like this:
RewriteRule ^s/(.*)$ matomo/$1 [NC,L,QSA]
but i get loads of js errors in the browser console.
after renaming the directory to /s (and removing the mod_rewrite command) it did not work (JS errors)
i endet up with this weird thing:
RewriteRule ^s/(.*)$ s/$1 [NC,L,QSA]
it redirects vom s/ to s/…
dont know what is happening… but without this line of code in the .htaccess it does not work…
How is it that you want to use Matomo, anyway? If you are only reporting to yourself, then surely you can restrict its use to your own IP address and make it invisible to everyone else.