Open pagoda panel, find the route you want to configure the Web site and find the configuration file (Figure 1)
(figure 1)
2. Add the code in the configuration file
set $root = /www/wwwroot/www.blogs.test/public; #当前应用的运行目录
location ~ \.php {
fastcgi_pass unix:/dev/shm/php-cgi.sock;
fastcgi_split_path_info ^((?U).+.php)(/?.+)$;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
fastcgi_param SCRIPT_FILENAME $root$fastcgi_script_name;
include fastcgi_params;
}
location ~ .*\.(gif|jpg|jpeg|bmp|png|ico|txt|js|css)$
{
root $root;
}
location / {
root $root;
index index.html index.php;
if ( -f $request_filename) {
break;
}
if ( !-e $request_filename) {
rewrite ^(.*)$ /index.php/$1 last;
break;
}
}
3. After configuration is complete, save and reload the configuration and reboot to Nigx