I am unable ot log in after the installation process


(Jonny Barnes) #1

I am unable to log in. I get the error message:

Error: Form security failed. Please reload the form and check that your cookies are enabled. If you use a proxy server, you must configure Piwik to accept the proxy header that forwards the Host header. Also, check that your Referrer header is sent correctly.

I am using PHP7.0.0 and nginx 1.9.7, Here’s my nginx vhost conf:

server {
    listen 443 ssl http2;
    listen [::]:443 ssl http2;
    server_name ****;

    ssl_certificate /etc/letsencrypt/live/****/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/****/privkey.pem;

    add_header Strict-Transport-Security "max-age=31536000; includeSubdomains; preload";

    root /home/jonny/websites/piwik;
    index index.php;

    location / {
        try_files $uri $uri/ /index.php?$query_string;
    }

    location ~* \.php$ {
        fastcgi_pass unix:/usr/local/var/run/php-fpm.sock;
        fastcgi_index index.php;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        include includes/fastcgi_params;
        fastcgi_param HTTPS on;
    }

    # Specify a charset
    charset utf-8;

    # Security Headers
    #include includes/security-headers.conf;

    # SSL Stapling
    include includes/stapling.conf;
}

And the inlcuded fastcgi_params:

fastcgi_param  QUERY_STRING       $query_string;
fastcgi_param  REQUEST_METHOD     $request_method;
fastcgi_param  CONTENT_TYPE       $content_type;
fastcgi_param  CONTENT_LENGTH     $content_length;

fastcgi_param  SCRIPT_NAME        $fastcgi_script_name;
fastcgi_param  REQUEST_URI        $request_uri;
fastcgi_param  DOCUMENT_URI       $document_uri;
fastcgi_param  DOCUMENT_ROOT      $document_root;
fastcgi_param  SERVER_PROTOCOL    $server_protocol;
fastcgi_param  HTTPS              $https if_not_empty;

fastcgi_param  GATEWAY_INTERFACE  CGI/1.1;
fastcgi_param  SERVER_SOFTWARE    nginx/$nginx_version;

fastcgi_param  REMOTE_ADDR        $remote_addr;
fastcgi_param  REMOTE_PORT        $remote_port;
fastcgi_param  SERVER_ADDR        $server_addr;
fastcgi_param  SERVER_PORT        $server_port;
fastcgi_param  SERVER_NAME        $server_name;

# PHP only, required if PHP was built with --enable-force-cgi-redirect
fastcgi_param  REDIRECT_STATUS    200;

Why can’t I log in?