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 ...
随机推荐
- UI“三重天”之实践Uiautomator1
说起来Uiautomator也有一年没碰过了.借此来回顾.总结一下. 也是阅读<精通APP自动化测试>一书.实践出真知的一个框架.编写了部分移动端UI自动化脚本.后续再深入学习. 虽然现在 ...
- Autofac ASP.NET Web API (Beta) Integration
With the beta release of ASP.NET MVC 4 and the ASP.NET Web API being released a few weeks ago, I dec ...
- HTTP与TCP/IP的区别
TPC/IP协议是传输层协议,主要解决数据如何在网络中传输,而HTTP是应用层协议,主要解决如何包装数据.关于TCP/IP和HTTP协议的关系,网络有一段比较容易理解的介绍:“我们在传输数据时,可以只 ...
- Resetting the Root Password Using rd.break for RHEL7
Start the system and, on the GRUB 2 boot screen, press the e key for edit. Remove the rhgb and quiet ...
- 利用Console来学习、调试JavaScript
一 什么是 Console Console 是用于显示 JS和 DOM 对象信息的单独窗口.并且向 JS 中注入1个 console 对象,使用该对象 可以输出信息到 Console 窗口中. 二 ...
- dart 命名规范
1.类型 首字母大写 譬如 abstract class Shape 2.变量 驼峰式命名,首字母小写 class Article { String headUrl; String user; Str ...
- centos7 安装 rabbitmq
主题 因为自己学习项目可能会用到rabbitmq..我又是第一次学习.以前没安装过.所以简单记录下我在centos7环境下安装rabbitmq的过程步骤,下次可以参考. 步骤 1.杂七杂八的东西 安装 ...
- Spring 学习记录7 初识XmlWebApplicationContext
主题 之前Spring相关的一些类,比如Enviromnent,BenFactory都接触了一些.有一些收获.但是直接看代码很多方法都不知为什么这样写.哪里会用到.因为太底层了.不好理解..现在从高层 ...
- 【转】内存耗用:VSS/RSS/PSS/USS
Terms VSS- Virtual Set Size 虚拟耗用内存(包含共享库占用的内存) RSS- Resident Set Size 实际使用物理内存(包含共享库占用的内存) PSS- Prop ...
- 运维自动化工具 Cobbler
简介: 关于操作系统安装方面的自动化,早前我们使用 RedHat 推出的 Kickstart 来批量安装操作系统,近年来 RedHat 又推出一个 Cobbler . Cobbler 使用 Pytho ...