zoukankan      html  css  js  c++  java
  • 搭建 window + nginx + php 开发环境

    一、下载 windows Mainline version  nginx,按官方文档安装

    二、下载  php7.3 并解压到工作目录

    三、以管理员身份打开 cmd,进入 php 目录,输入如下命令,!!! 电脑不关机,此cmd窗口不关闭 !!! 

    E:php7.3>php-cgi.exe -b 127.0.0.1:9000

    四、配置 nginx(复制如下配置覆盖原配置)

    # 支持 PHP_INFO
    location / {
        root   E:/Apache/htdocs/site/;
        index  index.php index.html index.htm;
        if (!-e $request_filename) {
            rewrite  ^/(.*)$  /index.php/$1  last;
            break;
        }
    }
    
    # 解析 php 文件
    location ~ .php {
        root           E:/Apache/htdocs/site/;
        fastcgi_pass   127.0.0.1:9000;
        fastcgi_index  index.php;
        fastcgi_param  SCRIPT_FILENAME  $document_root/$fastcgi_script_name;
        include        fastcgi_params;
    }

    五、启动 nginx

    E:
    ginx-1.17.9>nginx -s stop      fast shutdown
    E:
    ginx-1.17.9>nginx -s quit      graceful shutdown
    E:
    ginx-1.17.9>nginx -s reload    changing configuration, starting new worker processes with a new configuration, graceful shutdown of old worker processes
    E:
    ginx-1.17.9>nginx -s reopen    re-opening log files
  • 相关阅读:
    拷贝构造函数与赋值函数的区别
    C++模板(一)
    拷贝构造函数
    memcpy函数
    malloc calloc 和 realloc
    extern关键字
    C中不安全函数
    缓冲区溢出问题
    C++引用
    背包问题专栏(01,完全,多重)
  • 原文地址:https://www.cnblogs.com/gentsir/p/12662611.html
Copyright © 2011-2022 走看看