1、解压安装PHP,并修改php.ini文件
cgi.fix_pathinfo = 1
2、以CGI方式启动PHP
php-cgi.exe -b 127.0.0.1:9000 -c php.ini
3、解压安装Nginx,并修改conf/nginx.conf文件
location / { root html; index index.php index.html index.htm; }
location ~ \.php$ { root html; fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; }
4、启动Nginx服务器
start nginx
5、停止Nginx服务
nginx -s stop
6、重新加载Nginx配置文件
nginx -s reload
时间: 2024-12-08 18:22:50