Windows 配置 nginx php 多版本切换
1. 下载 nginx nginx.org
2. 下载 php windows.php.net 选择 nts 版本,解压后,将php.ini.development 重命名为 php.ini
3. 修改nginx.conf
   server {
        listen       80;
        server_name  localhost 127.0.0.1;
        #charset koi8-r;
        #access_log  logs/host.access.log  main;
        location / {
            root   C:/xampp_5.6/htdocs/v1.epiedc.net/backend/web;
            index  index-test.php index.html index.php  index.htm;
        }
        #error_page  404              /404.html;
        # redirect server error pages to the static page /50x.html
        #
        error_page   500 502 503 504  /50x.html;
        location = /50x.html {
            root   html;
        }
        # proxy the PHP scripts to Apache listening on 127.0.0.1:80
        #
        #location ~ \.php$ {
        #    proxy_pass   http://127.0.0.1;
        #}
        # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
        #
        location ~ \.php$ {
            root           C:/xampp_5.6/htdocs/v1.epiedc.net/backend/web;
            fastcgi_pass   127.0.0.1:9000;
            fastcgi_index  index.php;
            fastcgi_param  SCRIPT_FILENAME
			$document_root$fastcgi_script_name;
            include        fastcgi_params;
        }
        # deny access to .htaccess files, if Apache's document root
        # concurs with nginx's one
        #
        #location ~ /\.ht {
        #    deny  all;
        #}
    }
如果新增一个端口监控则:
	server {
		listen       1006;
		server_name  localhost ;
        location / {
            root   C:/xampp_5.6/htdocs/inspinia;
            index  index.html index.php  index.htm;
        }
	}
4. 开启nignx
在nginx目录中,运行cmd
start nginx
nginx -s stop 立即停止,不保存信息
nginx -s quit 正常退出,并保存信息
ngnix -s reload 重启
5. 在php目录中, php-cgi.exe -b 127.0.0.1:9000
http://blog.csdn.net/gwpking/article/details/54124564
6. 安装 mysql ,下载指定版本mysql 到目录,修改my.ini ,请注意目录分隔符
[client]
port = 3306
default-character-set = utf8
[mysqld]
port=3306
character_set_server=utf8
basedir=D:/server/mysql-5.7.17-winx64/mysql-5.7.17-winx64
#解压目录下data目录
datadir=D:/server/mysql-5.7.17-winx64/mysql-5.7.17-winx64/data sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
mysqld install MySQL --defaults-file="D:/tools/mysql-5.7.9-winx64/my.ini"
mysqld --defaults-file="D:\tools\mysql-5.7.9-winx64\my.ini" --console --skip-grant-tables
8. 安装服务 mysqld --install MYSQL --defaults-file = d:/server/aaa/my.ini
9. 初始化,创建数据库文件,先建立data文件夹, mysqld --initialize-insecure --user=mysql
10. 启动数据库 net start mysql
关闭数据库 net stop mysql
移除服务器名 mysqld --remove mysql
Windows 配置 nginx php 多版本切换的更多相关文章
- windows配置nginx实现负载均衡集群
		
windows配置nginx实现负载均衡集群2014-08-20 09:44:40 来源:www.abcde.cn 评论:0 点击:617 网上大部分关于nginx负载均衡集群的教程都是lin ...
 - windows配置nginx实现负载均衡集群 -请求分流
		
windows配置nginx实现负载均衡集群 一.windows上安装nginx 1.下载nginx的windows版本http://nginx.org/en/download.html 2.把压缩文 ...
 - 【开发工具】- Windows下多个jdk版本切换
		
一.直接安装jdk,如图我安装了JDK6.JDK7和JDK8三个版本: 二.在安装JDK8后需要在 C:\Windows\System32 该目录下删除 java.exe 和 javaw.exe两个文 ...
 - 基于Windows 配置 nginx  集群  & 反向代理
		
1.下载 nginx 下载页面 : http://nginx.org/en/download.html 具体文件: http://nginx.org/download/nginx-1.7.0.zip ...
 - Git for Windows之日志查看与版本切换
		
1.查看本地版本库的修改日志 (1).通过log指令查看完整日志 (2).通过 log --pretty=oneline查看简易版日志 2.版本切换 (1).切换到本地版本库最新的版本,通过reset ...
 - Windows 配置nginx服务器 运行php项目
		
1下载 http://nginx.org/en/download.html 选择稳定版下载. 2 解压后 直接双击nginx.exe 双击后一个黑色的弹窗一闪而过 3 修改配置文件nginx.conf ...
 - 烂泥:Windows下安装与配置Nginx web服务器
		
本文由秀依林枫提供友情赞助,首发于烂泥行天下. 前几篇文章,我们使用nginx都是在linux环境下,今天由于工作的需要.需要在windows环境也使用nginx搭建web服务器. 下面记录下有关ng ...
 - Windows下Nginx配置SSL实现Https访问(包含证书生成)
		
Vincent.李 Windows下Nginx配置SSL实现Https访问(包含证书生成) Windows下Nginx配置SSL实现Https访问(包含证书生成) 首先要说明为什么要实现https ...
 - CentOS 6.5移除openJDK及JDK安装环境变量配置及JDK版本切换
		
一.查找已经安装的open JDK [root@localhost ~]# rpm -qa|grep jdk java--openjdk-.el6_3.x86_64 java--openjdk-1.7 ...
 
随机推荐
- 十四 关于interrupt, interrupted, isInterrupted
			
1 判断线程是否是停止状态? interrupt() : interrupt方法用于中断线程.调用该方法的线程的状态为将被置为"中断"状态. 注意:线程中断仅仅是置线程的中断状态位 ...
 - C语言实现Base64编码/解码
			
Bse64是一种以64个可打印字符对二进制数据进行编码的编码算法.base64在对数据进行编码时以三个8位字符型数据为一组,取这三个字符型数据的ASCII码,然后以6位为一组组成4个新的数据,这4个新 ...
 - 第一章 : Android Studio 介绍  [Learn Android Studio 汉化教程]
			
摘自:http://ask.android-studio.org/?/question/789,为便于学习重新整理.. 本章将引导您完成安装和设置开发环境,然后你就可以跟随本书的例子和课程学习. 首先 ...
 - MonkeyScript测试命令集合
			
MonkeyScript:(不支持截屏) 可以被Monkey识别的集合命令 可以完成重复固定的操作 MonkeyRunner(支持截屏操作) 提供一系列API,可以完成模拟事件和截屏操作 Mo ...
 - freebsd静态路由
			
FreeBSD下增进静态路由的行动 1.手工添加 # route add -net 192.168.2.0/24 192.168.1.2 2. 通过rc.conf永世 设置 # Add static ...
 - Android 4 学习(21):对话框
			
对话框 创建Dialog的两种方式: 1. 使用Dialog类或其子类,包括DialogFragment 2. 在Activity中使用Dialog主题(theme) 下面是使用Dialog类的一个例 ...
 - ztree--插件实现增删改查demo(完整版)
			
ztree--插件实现增删改查demo(完整版) var setting = { async: { enable: true, ...
 - POI-Excel表格导入和导出
			
ExcelWriter /** * @author zuzhilong * @date 2013-10-10 下午08:04:02 * @desc 生成导出Excel文件对象 * @modify * ...
 - ffmpeg源码分析四:transcode_step函数 (转4)
			
原帖地址:http://blog.csdn.net/austinblog/article/details/25099979 该函数的主要功能是一步完整的转换工作,下面看看源代码: static int ...
 - 运维自动化工具 Kickstart
			
简介: 批量安装操作系统工具之 Kickstart ,RedHat 早前推出的产品( 不多说了,现在都玩 Cobbler 啦 ). 测试环境:CentOS 6.6 x86_64 minimal 一.安 ...