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 tomcat docker 负载均衡(Nginx+Tomcat实现负载均衡、动静分离的原理解析)
- linux安装nginx启动页面访问不到(apache,nginx上传目录无执行权限的设置方法)
- nginx文件夹限制ip访问(基于Nginx实现限制某IP短时间访问次数)
- nginx跳转规则配置上下文(基于nginx实现上游服务器动态自动上下线无需reload的实现方法)
- nginx如何代理项目(Nginx代理同域名前后端分离项目的完整步骤)
- nginx负载均衡原理3种(Nginx负载均衡以及动静分离的原理与配置)
- nginx配置ip端口访问(Nginx配置80端口访问8080及项目名地址方法解析)
- nginx+ssl配置详解(nginx配置ssl实现https的方法示例)
- nginx反向代码解决跨域访问(nginx 解决跨域问题嵌入第三方页面)
- nginx的最大并发(nginx限制并发连接请求数的方法)
- nginx结构图解(详解Nginx 工作原理)
- nginxpython编写模块(Python开发之Nginx+uWSGI+virtualenv多项目部署教程)
- nginx如何配置php项目(Nginx服务器究竟是怎么执行PHP项目)
- nginx反向代理多个server(Nginx反向代理多个服务器的实现方法)
- nginx 配置https(Nginx下配置Https证书详细过程)
- nginx给需要转发的链接添加参数(Nginx 根据URL带的参数转发的实现)
- 玩网游居然让人更友善 很难以让人置信(玩网游居然让人更友善)
- 学好汉语拼音,从娃娃绕口令抓起,平时还是要多练 收藏好(从娃娃绕口令抓起)
- 仙女们的私藏鲜法大PK 鲜香切块牛肉(仙女们的私藏鲜法大PK)
- 天热没胃口 这道菜开胃又下饭,2个小技巧新手一学就会(这道菜开胃又下饭)
- 指天椒紫苏爆炒牛肉(指天椒紫苏爆炒牛肉)
- 谷雨前,吃牛羊肉别忘了吃河鲜,除湿还清热,加紫苏一炒特解馋(吃牛羊肉别忘了吃河鲜)
热门推荐
- 自建FTP服务器并远程外网访问,花生棒自带端口映射3步搞定(自建FTP服务器并远程外网访问,花生棒自带端口映射3步搞定)
- 使用canvas的好坏(关于canvas绘制模糊问题的解决方法)
- python默认缩进设置(不归路系列:Python入门之旅-一定要注意缩进!!!推荐)
- idea 远程部署docker(IDEA使用Docker插件菜鸟教程)
- httpcontextbase 与 httpcontext
- css中好看的渐变颜色代码(CSS Tips:段落每行渐变色文本效果的实现方法)
- mysql的binlog日志详解(MySQL 有关MHA搭建与切换的几个错误log汇总)
- sql表更新关联语句(SQL update 多表关联更新的实现代码)
- 阿里云服务器总被攻击怎么办(香港云服务器遭遇恶意攻击怎么处理?)
- docker容器内查看内存占用(docker 查看进程, 内存, cup消耗的情况)
排行榜
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9