Markdown

[PHP] Primary script unknown because nginx doesn’t have the right to access dir

Primary script unknown because nginx doesn’t have the right to access dir


6
down vote
If you checked every thing and it’s correct configured, then there is last point i got:
check that correct username if mentioned in file /etc/php-fpm.d/www.conf
shareimprove this answer
answered Feb 24 '15 at 13:11
Nazir
1,4451419
2
Exactly this problem on OS X Yosemite with PHP 5.6 installed via Homebrew. It’s quite tricky to debug because neither the Nginx error log or the php-fpm error log, even in “Debug” mode, apparently won’t give you any further details than “Primary Script Unknown”. The default user/group is _www:_www, which may well be not what you want (I use [myname]:staff). To restart use sudo /usr/local/opt/php56/sbin/php56-fpm restart. – William Turrell Aug 2 '15 at 15:13
This helped me after wasting an hour trying to find a solution. Thanx – Sahil May 1 '16 at 22:48

留言