2017/04/27 04:27:15 [error] 3720#0: *153 FastCGI sent in stderr: “Unable to open primary script: /xx/xx/xx/xx.json (No such file or directory)” while reading response header from upstream, client: xx.xx.xx.xx , server: mysite.com, request: “POST /xx.json HTTP/1.1”, upstream: “fastcgi://127.0.0.1:9006”, host: “mysite.com”, referrer: “http://mysite.com/”
2017/04/27 04:27:14 [error] 3720#0: *153 open() “/xx/xx/xx/x.js” failed (2: No such file or directory), client: xx.xx.xx.xx, server: mysite.com, request: “GET /deps.js HTTP/1.1”, host: “mysite.com”, referrer: “http://mysite.com/”
Please I need assistance.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
This could be an issue with permissions, or potentially an issue with SCRIPT_FILENAME in your PHP FastCGI Params configuration.
I’d start by making sure that files and directories are owned by the user and group that is defined in your PHP-FPM pool.d file. If you’ve not setup a custom pool, that user would be www-data. If you have setup a custom pool, then you’d use that user and group.
For example, if you’re home directory – the directory where your files are located – is:
/home/username/public_html
You’d want run ls -al on that directory to see who owns it as well as the files within it. If it’s not the same user defined in your pool file, you’ll need to chown (change ownership).
We can do this recursively using chown -R. For example, to give www-data ownership, we’d run:
chown -R www-data:www-data /home/username/public_html
Now public_html and all files and directories within that directory are owned by www-data.
…
If it’s not permissions related, we may need to look at other areas, such as fastcgi_params which is what you should be includeing in your PHP block.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.