搭建 window + nginx + php 开发环境
程序员文章站
2022-06-22 08:29:52
一、下载 windows Mainline version nginx,按官方文档安装 二、下载 php7.3 并解压到工作目录 三、以管理员身份打开 cmd,进入 php 目录,输入如下命令,!!! 电脑不关机,此cmd窗口不关闭 !!! E:\php7.3>php-cgi.exe -b 127. ......
一、下载 windows mainline version ,按安装
二、下载 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:\nginx-1.17.9>nginx -s stop fast shutdown e:\nginx-1.17.9>nginx -s quit graceful shutdown e:\nginx-1.17.9>nginx -s reload changing configuration, starting new worker processes with a new configuration, graceful shutdown of old worker processes e:\nginx-1.17.9>nginx -s reopen re-opening log files
上一篇: 从上帝视角看Java如何运行
推荐阅读
-
nginx - mac 下搭建php环境出错?
-
实战在Ubuntu上配置Nginx+PHP+MySQL环境
-
标准版Eclipse搭建PHP环境的详细步骤
-
php55+apache24安装 环境搭建
-
linux下java web开发环境搭建
-
Nginx 0.7.x + PHP 5.2.9(FastCGI)搭建胜过Apache十倍的Web服
-
Windows+Apache搭建PHP开发环境_PHP
-
浅谈本地WAMP环境的搭建_PHP
-
nginx+apache+mysql+php+memcached+squid集群web环境 (1/6)_PHP教程
-
全新Mac配置PHP开发环境教程,macphp开发教程