About File not found after php execution.

WBOY
Release: 2016-07-06 13:52:47
Original
2682 people have browsed it

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>
Copy after login
Copy after login

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>
Copy after login
Copy after login

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

Related labels:
php
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template