The following is a brief explanation of the configuration of tp5 running on nginx.
The tp5 project does not support pathinfo by default in nginx, so how do we configure it?
Let’s look at the following problem first. After we configure the domain name according to the normal process, point it to the public directory and restart nginx. When accessing, the path error is reported and 500 appears.
Solution:
In the fastcgi.conf file we will see the following:
##
fastcgi_param PHP_ADMIN_VALUE "open_basedir=$document_root/:/tmp/:/proc/";
fastcgi_param PHP_ADMIN_VALUE "open_basedir=$document_root/../:/tmp/:/proc/";
Modify it to:
open_basedir=/home/wwwroot/kilts/public:/tmp/:/proc/
The above is the detailed content of Detailed explanation of the configuration method of thinkPHP5 running on nginx. For more information, please follow other related articles on the PHP Chinese website!