Home > OS >  Nginx run PHP File shows the File not found.
Nginx run PHP File shows the File not found.

Time:10-02

Environment configuration! Executable files can also be called directly PHP!!!!!!

Find for a long time all don't know what's the problem! Pray god give directions! Here is my nginx configuration diagram,,


CodePudding user response:

Can only run HTML page!
PHP page is wrong, for help

CodePudding user response:

Ah tested! If you do not change the HTML path is possible! After modification for the custom site root directory is wrong!! Is screening for the next step

CodePudding user response:

Is your PHP project files on your nginx default root directory, not, can be in the server configuration, specify the root directory the root//* * * * * * *

CodePudding user response:

reference zhouchao6 reply: 3/f
is your PHP project files on your nginx default root directory, not, can be in the server configuration, specify the root directory the root/* * * * * * *


Here there is a problem it is! In the default directory can!!!!! After I modified defined directory for myself out of the question! After adjust nginx. Conf for the root user can perform static files! But cannot perform the PHP file, I saw his child is nobody is going to modify the root can???????

CodePudding user response:

reference zhouchao6 reply: 3/f
is your PHP project files on your nginx default root directory, not, can be in the server configuration, specify the root directory the root/* * * * * * *


Even if don't modify the user for root access static pages also show 403 without permission, and, feeling is my folder directory permissions set has a problem! But I saw the WWW directory permissions is 755

CodePudding user response:

reference zhouchao6 reply: 3/f
is your PHP project files on your nginx default root directory, not, can be in the server configuration, specify the root directory the root/* * * * * * *


Wooden thing!! I put the web root directory in the home folder is ok,,,,
  • Related