nginx + php-fpm = File not found

前端 未结 8 1735
孤街浪徒
孤街浪徒 2021-02-07 01:25

When i try accessing info.php I get a File not found. error.

I tried some Tutorials to no avail.

Configs: default:

ser         


        
8条回答
  •  广开言路
    2021-02-07 02:03

    I came across this whilst trying to solve a similar problem. So I'll add the solution I found when I got to it. This was on Arch, but it is systemd related.

    This solution is for my development machine, and for good reasons, you shouldn't run a public site from your /home folder.

    I configured php-fpm and nginx to run as my user. Edit the following file, and remove the ProtectHome=true line

    sudo vi /etc/systemd/system/multi-user.target.wants/php-fpm.service
    

    Reload, and restart everything;

    systemctl daemon-reload
    systemctl restart nginx.service
    systemctl restart php-fpm.service
    

提交回复
热议问题