Trying to install piwik

Hello,

I am trying to install piwik on synology. i get this message:

504 There is an error while processing this request.

This message i got when i clicked install in the installation procesdure that comes up clicked the red button.

Before i got to this step i got this message:

An error occurred

Piwik couldn’t write to some directories (running as user ‘http’).

Try to Execute the following commands on your server, to allow Write access on these directories:

chown -R http:www-data /volume1/web/piwik
chmod -R 0755 /volume1/web/piwik/tmp
chmod -R 0755 /volume1/web/piwik/tmp/assets
chmod -R 0755 /volume1/web/piwik/tmp/cache
chmod -R 0755 /volume1/web/piwik/tmp/logs
chmod -R 0755 /volume1/web/piwik/tmp/tcpdf
chmod -R 0755 /volume1/web/piwik/tmp/templates_c
If this doesn’t work, you can try to create the directories with your FTP software, and set the CHMOD to 0755 (or 0777 if 0755 is not enough). To do so with your FTP software, right click on the directories then click permissions.

After applying the modifications, you can refresh the page.

If you need more help, try Piwik.org.

at this point i logged into the DSM, diskstation using ssh and did chown and chmod. But it was not possible to do www-data so i did the following commands:

chown -R http:http /volume1/web/piwik
chmod -R 0777 /volume1/web/piwik/tmp
chmod -R 0777 /volume1/web/piwik/tmp/assets
chmod -R 0777 /volume1/web/piwik/tmp/cache
chmod -R 0777 /volume1/web/piwik/tmp/logs
chmod -R 0777 /volume1/web/piwik/tmp/tcpdf
chmod -R 0777 /volume1/web/piwik/tmp/templates_c

It was after that i had done the above commands that i got to the installation screen with the 8 steps but when i clicked the red button to do the first step then it broke down and i ended up at:

504 There is an error while processing this request.

So i couldnt do step two in the installation procedure. Please help me and show me how i am going to get through the installation procedure.

My operating system is (when i type uname -a):

Linux cross 3.2.40 #15047 Tue Feb 14 02:38:20 CST 2017 armv7l GNU/Linux synology_armada370_216se

Please tell me how to get a head or give me some advice on possible things i can do to install piwik manually on my diskstation.

I should also say that i have apache http server 2.2 and php 5.6 installed and running on a virtual server pointing to the folder of piwik.

Regards Mattias