当前位置:Gxlcms > 数据库问题 > 小白搭建WNMP详细教程---NGINX、MYSQL、PHP的整合配置

小白搭建WNMP详细教程---NGINX、MYSQL、PHP的整合配置

时间:2021-07-01 10:21:17 帮助过:33人阅读

        # 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   

人气教程排行