Separate admin section: piwik.php

(Innocentus) #1

I have installed piwik in an admin area separated from the public.
Now I have noticed that the javascript-tracking code and the img-tag inside the noscript-part of it are all pointing to the piwik.php inside the administrative area.
The problem now is that normal visitors cannot and mustn’t access this administrative area of the website and so a visit cannot be registered.

Now I don’t want to install piwik in the public area of the website.
Is there a way to separate the piwik.php from all other files? Can I move the piwik.php to the public area and just change the paths internally to the rest of the piwik-installation so that it still can work?

And what is about auto-updates if I have done this manipulation? Can they still succeed or will there be problems?
And what is planned for the future of piwik regarding this admin/public-problem?

Thank you for your answers in advance!
With best regards

(vipsoft) #2

reverse proxy

(Innocentus) #3

Thank you for your answer.

Unfortunately my provider doesn’t allow mod_proxy to be used. - However - I have found a solution which works fine for me:
I have created a php file within the public section of the website which very simply just requires (require_once(’…’)style_emoticons/<#EMO_DIR#>/wink.gif the piwik.php from the piwik-installation folder in the protected admin-section.
I also had to copy the piwik.js-file to the public section because it is also needed for the visitor.

Maybe it is even possible to route the url-requests via mod_rewrite - this was complicated for me because I have already used quite complex catch-all rules for a gateway-index.php script and so I have decided for the quite simple require-solution.

With best regards