a 文件转发 b 文件
location = /a.php {
proxy_pass http://127.0.0.1/b.php;
}
#此处必须是等于哈, 不能是模糊匹配,否则会直接到下边的 location 里去
location ~ \.php$ {
root /var/www/test;
fastcgi_pass unix:/run/php/php7.2-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}