问题1:安装完php后,php-cgi运行不起来
运行命令php-cgi -b 127.0.0.1:9006 -c php.ini
程序很快就退出了,再去官网查看一下下载的版本对不对,结果发现是自己没装VC14的运行库
问题2:nginx.conf php.ini的配置问题
php.ini
cgi.fix_pathinfo=1
nginx.conf
upstream multicgi {
server 127.0.0.1:9006;
server 127.0.0.1:9007;
}
server {
listen 80;
server_name localhost;
location ~ \.php$ {
root D:/xxxx/xxxx;
fastcgi_pass multicgi;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
问题3:访问http://localhost/index.php 并没有展示hello word,而是直接把文件下载下来了
浏览器缓存问题,清一下浏览器缓存