Home >Backend Development >PHP Tutorial >About File not found after php execution.

About File not found after php execution.

WBOY
WBOYOriginal
2016-07-06 13:52:472707browse

I am using centos6.0

php and php-fpm are installed through yum, and then nginx is configured as

<code>location ~ \.php$ {
        root           /root/code/wordpress;
        fastcgi_pass   127.0.0.1:9000;
        fastcgi_index  index.php;
        fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
        include        fastcgi_params;
    }
</code>

I don’t know why accessing the php file returns file not found. I don’t know if there is any configuration in fpm that needs to be started to parse the Php file. Please give me some advice. Thank you

Reply content:

I am using centos6.0

php and php-fpm are installed through yum, and then nginx is configured as

<code>location ~ \.php$ {
        root           /root/code/wordpress;
        fastcgi_pass   127.0.0.1:9000;
        fastcgi_index  index.php;
        fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
        include        fastcgi_params;
    }
</code>

I don’t know why accessing the php file returns file not found. I don’t know if there is any configuration in fpm that needs to be started to parse the Php file. Please give me some advice. Thank you

I noticed that your file is placed in the root home directory. Does php-fpm have permission to read it?

Set read permission for index.php file

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn