使用nginx配置访问wgcloud的方法


Posted in Servers onJune 26, 2021

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内容请搜索三水点靠木以前的文章或继续浏览下面的相关文章希望大家以后多多支持三水点靠木!

Servers 相关文章推荐
nginx 多个location转发任意请求或访问静态资源文件的实现
Mar 31 Servers
Nginx 根据URL带的参数转发的实现
Apr 01 Servers
利用Nginx代理如何解决前端跨域问题详析
Apr 02 Servers
详解Apache SkyWalking 告警配置指南
Apr 22 Servers
配置nginx 重定向到系统维护页面
Jun 08 Servers
详解nginx安装过程并代理下载服务器文件
Feb 12 Servers
nginx刷新页面出现404解决方案(亲测有效)
Mar 18 Servers
解决xampp安装后Apache无法启动
Mar 21 Servers
nginx lua 操作 mysql
May 15 Servers
聊聊配置 Nginx 访问与错误日志的问题
May 25 Servers
Docker与K8s关系介绍不会Docker也可以使用K8s
Jun 25 Servers
Flink 侧流输出源码示例解析
Sep 23 Servers
Nginx反向代理配置的全过程记录
制作能在nginx和IIS中使用的ssl证书
解析在浏览器地址栏输入一个URL后发生了什么
Linux中Nginx的防盗链和优化的实现代码
详解nginx进程锁的实现
Jun 14 #Servers
Nginx四层负载均衡的配置指南
配置nginx 重定向到系统维护页面
Jun 08 #Servers
You might like
PHP下操作Linux消息队列完成进程间通信的方法
2010/07/24 PHP
PHP中__get()和__set()的用法实例详解
2013/06/04 PHP
php使用google地图应用实例
2014/12/31 PHP
通过jQuery源码学习javascript(一)
2012/12/27 Javascript
javascript表格的渲染组件
2015/07/03 Javascript
jquery验证邮箱格式并显示提交按钮
2015/11/07 Javascript
iOS和Android用同一个二维码实现跳转下载链接的方法
2016/09/28 Javascript
JS 实现随机验证码功能
2017/02/15 Javascript
vue.js 初体验之Chrome 插件开发实录
2017/05/13 Javascript
jQuery实现导航栏头部菜单项点击后变换颜色的方法
2017/07/19 jQuery
JS闭包的几种常见形式实例详解
2017/09/16 Javascript
关于redux-saga中take使用方法详解
2018/02/27 Javascript
vue中当图片地址无效的时候,显示默认图片的方法
2018/09/18 Javascript
微信小程序实现登录遮罩效果
2018/11/01 Javascript
微信小程序开发之左右分栏效果的实例代码
2019/05/20 Javascript
结合axios对项目中的api请求进行封装操作
2020/09/21 Javascript
Python实现冒泡排序的简单应用示例
2017/12/11 Python
Python获取当前公网ip并自动断开宽带连接实例代码
2018/01/12 Python
python 判断网络连通的实现方法
2018/04/22 Python
python创建与遍历List二维列表的方法
2019/08/16 Python
python3的数据类型及数据类型转换实例详解
2019/08/20 Python
pywinauto自动化操作记事本
2019/08/26 Python
Python autoescape标签用法解析
2020/01/17 Python
pandas实现excel中的数据透视表和Vlookup函数功能代码
2020/02/14 Python
CSS3 分类菜单效果
2019/05/27 HTML / CSS
俄罗斯旅游网站:Tripadvisor俄罗斯
2017/03/21 全球购物
一些Solaris面试题
2013/03/22 面试题
JAVA程序设计笔试题面试题一套
2015/07/28 面试题
护士自荐信范文
2013/12/15 职场文书
会计专业导师推荐信
2014/03/08 职场文书
师德师风的心得体会
2014/09/02 职场文书
店铺转让协议书
2014/12/02 职场文书
2015党建工作简报
2015/07/21 职场文书
Python+OpenCV实现在图像上绘制矩形
2022/03/21 Python
i5-10400f处理相当于i7多少水平
2022/04/19 数码科技
德生2P3收音机开箱评测
2022/04/30 无线电