Server redirects to hostname "piwik" when creating, modifying and deleting users

Hello Support,

we use piwik 3.0.1 (currently newest stable build) on a server, so far it works great. However, when we try to add, modify or delete an user under Administration -> System -> User, the server redirects us to only “piwik”, which of course does not exist:

https://piwik/index.php?module=UsersManager&action=index&idSite=1&period=day&date=yesterday&updated=1

Instead, the url call should be like this:

https://HOSTNAME/piwik/index.php?module=UsersManager&action=index&idSite=1&period=day&date=yesterday&updated=1

It seems to miss the hostname somehow.

However, after the error, if we go back and look at the users, the user is still added / modified / deleted. So the command itself goes smoothly, but the error says otherwise.

In our config.ini.php, the host is set as a trusted host.

What can we do to fix this redirect problem?

  1. Create a database backup, first!

  2. Check your Piwik database table »piwik_option«. What’s your piwikUrl? If it’s empty, add your domain name

  3. Clear your cache

  4. Open http://HOSTNAME

Thank you - i checked the table and there is indeed our url entry:

https://HOSTNAME//piwik

So the hostname is there. We restarted multiple times to sort out any reload problems bit this isn’t either.

One thing to note is, that the piwik server itself does not serve https. We access to this piwik server through a apache loadbalancer, that has https activated.

Do we have to configure additional parameters because of that?

Regarding the Load balancer take a look at the FAQ Does Piwik work in a load balanced environment? How do I setup Piwik for high scale tracking? and also How do I configure Piwik when the server is installed behind a proxy?

Your 2nd thread might be related to this.

Thank you. I did configure this before but i checked again & tested out the solutions. Sadly, the behaviour is still the same, no matter which proxy header settings i use. :confused:

as a loadbalancer, we use also standard apache httpd 2.4.6 on centos 7.

Hello again,

any more ideas i could try? I already configured the settings as suggested by howdytom, but still no change unfortunately.

Hello,

just for documentation - the steps provided by howdytom helped, only in step 3, i didn’t really help to clean cache because we are behind a proxy. So opened the site from an completely different location and now it worked. The change to one slash was now successful. The error does not happen anymore.

Thanks!