windows下nginx负载均衡配置(使用nginx配置访问wgcloud的方法)
类别:服务器 浏览量:2333
时间:2021-10-05 00:39:47 windows下nginx负载均衡配置
使用nginx配置访问wgcloud的方法nginx配置如下:
如http://172.17.188.27/wgcloud
server { listen 80; server_name localhost; #charset koi8-r; #access_log logs/host.access.log main; location / { proxy_pass http://172.17.188.27:9999; #root html; #index index.html 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 html; # fastcgi_pass 127.0.0.1:9000; # fastcgi_index index.php; # fastcgi_param SCRIPT_FILENAME /scripts$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; #} }
记得agent的配置文件项serverUrl的80端口也要写上,如下
#wgcloud-server端访问地址,端口一定要写,即使是80也要写哈 serverUrl=http://172.17.188.27:80
补充:nginx配置访问wgcloud,提高访问速度
upstream wgcloudServer { server 172.17.188.27:9999 weight=10; ip_hash; } server { listen 80; server_name localhost; #charset koi8-r; #access_log logs/host.access.log main; location / { proxy_pass http://wgcloudServer; #root html; #index index.html 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; }
到此这篇关于使用nginx配置访问wgcloud的文章就介绍到这了,更多相关nginx配置wgcloud内容请搜索开心学习网以前的文章或继续浏览下面的相关文章希望大家以后多多支持开心学习网!
您可能感兴趣
- nginx如何配置不显示nginx名字(Nginx安装完成没有生成sbin目录的解决方法)
- nginx反向代理spring boot(Nginx+SpringBoot实现负载均衡的示例)
- nginx-rtmp-module 配置(Nginx搭建rtmp直播服务器实现代码)
- nginx tomcat docker 负载均衡(Nginx+Tomcat实现负载均衡、动静分离的原理解析)
- 如何设置nginx使用ip访问(nginx基于域名,端口,不同IP的虚拟主机设置的实现)
- nginx负载均衡与动静分离(Nginx配置之实现多台服务器负载均衡)
- 如何认识服务器(关于Nginx、Apache、Tomcat三个WEB服务器的区别和认知)
- nginx服务器有什么用(Nginx的作用详解,为什么在Web服务器中Nginx的比例越来越高?)
- 宝塔nginx装哪个版本(宝塔面板nginx关闭状态,启动不了解决办法)
- nginx状态查询(使用goaccess分析nginx日志的详细方法)
- nginx配置静态资源访问(nginx 多个location转发任意请求或访问静态资源文件的实现)
- nginx 正向和反向代理(Nginx反向代理入门实战指南)
- docker重新加载nginx(Docker Nginx Log 三者的处理详解)
- nginx安全配置提示(wdcp Linux面板nginx启用gzip后js未压缩解决方案)
- nginx启动报错连接失败(宝塔面板Nginx环境中出现404 Not Found的解决方法)
- nginx 根据url限流(浅谈Nginx 中的两种限流方式)
- 失传的古代飞行棋游戏 六博(失传的古代飞行棋游戏)
- 感冒要吃什么药(猫咪感冒要吃什么药)
- 下雪会怎样(下雪怎样画)
- 白蓝色穿搭(白蓝色衣服配什么裤子)
- 天空是什么颜色(天空是什么颜色的英语)
- 高马尾扎发(高马尾扎发教程视频)
热门推荐
- python中统计文本中单词数的代码(Linux上使用Python统计每天的键盘输入次数)
- axios调用接口(如何实现axios的自定义适配器adapter)
- mysql substr函数的用法(MySQL切分函数substring的具体使用)
- php面向对象3大特征(PHP面向对象程序设计重载overloading操作详解)
- css before和after(CSS中灵活使用:before和:after)
- zabbix监控网络线路(分布式监控系统之Zabbix 使用SNMP、JMX信道采集数据的原理解析)
- mysql分区怎么实现(MySql分表、分库、分片和分区知识深入详解)
- zabbixagent开发环境(Linux zabbix agent部署及配置方法详解)
- dedecms中的有些功能如何修改(DEDECMS 扩展标签和dede自定义标签实现方法)
- mysql的字符串截取函数(MySQL实现字符串的拼接,截取,替换,查找位置的操作)
排行榜
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9