使用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 中的两种限流方式
Mar 31 Servers
如何在centos上使用yum安装rabbitmq-server
Mar 31 Servers
Nginx配置80端口访问8080及项目名地址方法解析
Mar 31 Servers
详解nginx.conf 中 root 目录设置问题
Apr 01 Servers
教你快速开启Apache SkyWalking的自监控
Apr 25 Servers
Nginx部署vue项目和配置代理的问题解析
Aug 04 Servers
Windows Server 2016 配置 IIS 的详细步骤
Apr 28 Servers
Nginx配置之禁止指定IP访问
May 02 Servers
Linux在两个服务器直接传文件的操作方法
Aug 05 Servers
教你使用RustDesk 搭建一个自己的远程桌面中继服务器
Aug 14 Servers
ubuntu20.04虚拟机无法上网的问题及解决
Dec 24 Servers
Nginx反向代理配置的全过程记录
制作能在nginx和IIS中使用的ssl证书
解析在浏览器地址栏输入一个URL后发生了什么
Linux中Nginx的防盗链和优化的实现代码
详解nginx进程锁的实现
Jun 14 #Servers
Nginx四层负载均衡的配置指南
配置nginx 重定向到系统维护页面
Jun 08 #Servers
You might like
基于在生产环境中使用php性能测试工具xhprof的详解
2013/06/03 PHP
PHP登录环节防止sql注入的方法浅析
2014/06/30 PHP
php中magic_quotes_gpc对unserialize的影响分析
2014/12/16 PHP
php通过递归方式复制目录和子目录的方法
2015/03/13 PHP
详解PHP的Yii框架的运行机制及其路由功能
2016/03/17 PHP
PHP实现图的邻接矩阵表示及几种简单遍历算法分析
2017/11/24 PHP
PHP数组常用函数实例小结
2018/08/20 PHP
php和asp语法上的区别总结
2019/05/12 PHP
php测试kafka项目示例
2020/02/06 PHP
Javascript - HTML的request类
2006/07/15 Javascript
Highslide.js是一款基于js实现的网页中图片展示插件
2020/03/30 Javascript
jQuery实现切换页面布局使用介绍
2011/10/09 Javascript
js获取height和width的方法说明
2013/01/06 Javascript
jQuery中:contains选择器用法实例
2014/12/30 Javascript
AngularJS的一些基本样式初窥
2015/07/27 Javascript
原生js仿jquery一些常用方法(必看篇)
2016/09/20 Javascript
老生常谈javascript变量的命名规范和注释
2016/09/29 Javascript
Vue.js创建Calendar日历效果
2016/11/03 Javascript
vue中component组件的props使用详解
2017/09/04 Javascript
nodeJS服务器的创建和重新启动的实现方法
2018/05/12 NodeJs
使用VUE+iView+.Net Core上传图片的方法示例
2019/01/04 Javascript
React实现轮播效果
2020/08/25 Javascript
[01:18:43]2014 DOTA2华西杯精英邀请赛5 24 iG VS DK
2014/05/25 DOTA
python操作CouchDB的方法
2014/10/08 Python
python插入数据到列表的方法
2015/04/30 Python
Python实现定时精度可调节的定时器
2018/04/15 Python
Python实现求解一元二次方程的方法示例
2018/06/20 Python
在pycharm中设置显示行数的方法
2019/01/16 Python
Python pandas RFM模型应用实例详解
2019/11/20 Python
Canvas globalCompositeOperation
2018/12/18 HTML / CSS
预订奥兰多和佛罗里达州公园门票:FloridaTix
2018/01/03 全球购物
中科方德软件测试面试题
2016/04/21 面试题
自荐信封面
2013/12/04 职场文书
规划编制实施方案
2014/03/15 职场文书
不拖欠农民工工资承诺书
2014/03/31 职场文书
CSS精灵图的原理与使用方法介绍
2022/03/17 HTML / CSS