nginx使用stream反向代理mysql
来源:互联网 发布:淘宝海景房图片怎么做 编辑:程序博客网 时间:2024/06/05 15:30
参考:http://www.linuxidc.com/Linux/2017-03/142221.htm
nginx代理mysql
1、nginx版本至少1.9的版本,版本太低没有stream这个功能
2、下载nginx
# wget http://nginx.org/download/nginx-1.10.3.tar.gz
# tar xvf nginx-1.10.3.tar.gz
3、编译
# ./configure --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module --with-http_realip_module --with-http_flv_module --with-http_mp4_module --with-http_gzip_static_module--with-stream --with-stream_ssl_module
# make
# make install
nginx代理mysql
1、nginx版本至少1.9的版本,版本太低没有stream这个功能
2、下载nginx
# wget http://nginx.org/download/nginx-1.10.3.tar.gz
# tar xvf nginx-1.10.3.tar.gz
3、编译
# ./configure --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module --with-http_realip_module --with-http_flv_module --with-http_mp4_module --with-http_gzip_static_module--with-stream --with-stream_ssl_module
# make
# make install
4、修改配置文件
#user nobody;
worker_processes 1;
#error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;
#pid logs/nginx.pid;
events {
worker_connections 1024;
}
stream {
server {
listen 12345;
proxy_connect_timeout 1s;
proxy_timeout 3s;
proxy_pass 127.0.0.1:3306;
}
}
#user nobody;
worker_processes 1;
#error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;
#pid logs/nginx.pid;
events {
worker_connections 1024;
}
stream {
server {
listen 12345;
proxy_connect_timeout 1s;
proxy_timeout 3s;
proxy_pass 127.0.0.1:3306;
}
}
5、启动nginx
# /usr/local/nginx/sbin/nginx
6、测试
# /usr/local/nginx/sbin/nginx
6、测试
阅读全文
0 0
- nginx使用stream反向代理mysql
- 使用Nginx搭建反向代理
- 使用nginx作为反向代理
- 使用nginx 实现反向代理
- 使用Nginx实现反向代理
- 使用nginx做反向代理
- 使用Nginx反向代理Tomcat
- 使用Nginx实现反向代理
- windows 使用 nginx 反向代理
- 使用Nginx反向代理Jenkins
- 使用Nginx实现反向代理
- 使用Nginx实现反向代理
- 使用Nginx实现反向代理
- 使用Nginx实现反向代理
- 使用Nginx实现反向代理
- 使用Nginx实现反向代理
- 使用Nginx实现反向代理
- 使用Nginx实现反向代理
- MVC、MVP的区别和MVVM设计模式及实例
- Android给RecyclerView添加头(Header)和尾(Footer)和分标题(Title)——最简单的两种方法
- CCF 201612-2 工资计算
- todomvp的简化版本
- 微信小程序实现图片懒加载的懒办法(思路参考)
- nginx使用stream反向代理mysql
- 【笔记】Java代码调用exe
- vue-cli构建项目
- ios借贷类马甲包
- 第3章 Unity Shader 基础
- 数字类型
- 个人失败的网站运营经历,三年一分钱没赚到
- 11月总结
- Centos6.5 安装 RabbitMQ3.6.1