The default website root directory is /usr/local/nginx/html, change it to /home/wwwvi /usr/local/nginx/conf/nginx.conf
Change the
location / {
root html;
index.php tm; }
changed to
location / {
root /home/www;
index index.php index.html index.htm; }
Then location ~ .php$ {
root html;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php; cgi_script_name;
include fastcgi_params; changed to
location ~ .php$ { root
/home/www;
fastcgi_pass
127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
The above introduces nginx to modify the website root directory, including the relevant content. I hope it will be helpful to friends who are interested in PHP tutorials.