# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
#location ~ \.php$ {
# root html;
# fastcgi_pass 127.0.0.1:9000;
# fastcgi_index index.php;
# fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
# include fastcgi_params;
#}
先将前面的“#”去掉,同样将root html;改为root d:/wnmp/www; 再把“/scripts”改为“$document_root”,这里的“$document_root”就是指前面“root”所指的站点路径,这是改完后的。
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
location ~ \.php$ {
root d:/wnmp/www;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
三、配置PHP
- 找到
; extension_dir = "ext",去掉前面的分号,再改为extension_dir = "D:\wnmp\php\ext" - 找到
;date.timezone =,去掉前面的分号,再改为date.timezone = Asia/Shanghai - 找到
;cgi.force_redirect = 1,去掉前面的分号,再改为cgi.force_redirect = 0 - 找到
;cgi.rfc2616_headers = 0,去掉前面的分号,再改为cgi.rfc2616_headers = 1 - 找到
enable_dl = Off,改为enable_dl = On - 找到
;fastcgi.impersonate = 1,去掉前面的分号 - 找到
;extension=php_curl.dll,去掉前面的分号 - 找到
;extension=php_gd2.dll,去掉前面的分号 - 找到
;extension=php_mbstring.dll,去掉前面的分号 - 找到
;extension=php_mysqli.dll,去掉前面的分号 - 找到
;extension=php_pdo_mysql.dll,去掉前面的分号
小白搭建WNMP详细教程---NGINX、MYSQL、PHP的整合配置
标签:路径 dex 定义 设置 nat 我的电脑 color 窗口 ram