Nginx php-fpm No input file specified

When accessing PHP files from location block that have different document root specified using alias, i get error

No input file specified.

nginx php-fpm  error

Here is the Nginx config i used

If I access an HTML file or any non-PHP file, it works properly from/ok/ location.

The problem is due to php-fpm not able to find the proper path when using the alias. If I put the PHP files inside a folder /ok/, it worked.

To fix the problem, add the following code before fastcgi_pass

Example

nginx php-fpm error no input

Back to Nginx

Leave a Reply

Your email address will not be published. Required fields are marked *