Superuser has no access on fresh install (Ubuntu 16.04, MariaDB 10.1, Nginx 1.13, PHP 7.1, Piwik 3.0.4)

Hey all,

I’ve been trying to setup Piwik on my server today and have had no luck.

When trying to view a website I get this error: You can't access this resource as it requires an 'view' access for the website id = 1.

When trying to view my account: You must be logged in to access this functionality.

This seems to indicate there could be something wrong with the login?

Any help is greatly appreciated!

I fixed this, problem with Nginx conf for that site.

I had something like this in my conf:

if ($request_uri ~* "^(.*/)index\.php/?(.*)") {
    return 301 "$1$2";
}

I just commented it out, restarted Nginx and it worked.

I’m not an expert with Nginx but I think that it’s matching anything before and after index.php rewriting the url and then redirecting you via 301 permanently moved. In my testing I found it didn’t match all the parameters after .php? and that broke Piwik.

But again, not an expert. Just my limited understanding.