I cannot solve "FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream,

Hey,

maybe you are not running the Nginx documentation (Unofficial (Community) ) configuration required for ownCloud?

If you are using this configuration then i just have found a small problem in it. Instead of:

oc[sm]-provider/.+||core/templates/40[34])

it should be (without the doubled ||):

oc[sm]-provider/.+|core/templates/40[34])

I have asked the ownCloud team to update it in Updates for the nginx community configuration