使用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处理http请求实现过程解析
Mar 31 Servers
Nginx配置之实现多台服务器负载均衡
Aug 02 Servers
总结高并发下Nginx性能如何优化
Nov 01 Servers
nginx中封禁ip和允许内网ip访问的实现示例
Mar 17 Servers
Kubernetes关键组件与结构组成介绍
Mar 31 Servers
了解Kubernetes中的Service和Endpoint
Apr 01 Servers
Docker官方工具docker-registry案例演示
Apr 13 Servers
Nginx配置之禁止指定IP访问
May 02 Servers
使用Nginx的访问日志统计PV与UV
May 06 Servers
shell进度条追踪指令执行时间的场景分析
Jun 16 Servers
Win2008系统搭建DHCP服务器
Jun 25 Servers
windows10 家庭版下FTP服务器搭建教程
Aug 05 Servers
Nginx反向代理配置的全过程记录
制作能在nginx和IIS中使用的ssl证书
解析在浏览器地址栏输入一个URL后发生了什么
Linux中Nginx的防盗链和优化的实现代码
详解nginx进程锁的实现
Jun 14 #Servers
Nginx四层负载均衡的配置指南
配置nginx 重定向到系统维护页面
Jun 08 #Servers
You might like
php 设计模式之 单例模式
2008/12/19 PHP
php全排列递归算法代码
2012/10/09 PHP
PHP Switch 语句之学习笔记
2013/09/21 PHP
简单解决微信文章图片防盗链问题
2016/12/17 PHP
Thinkphp5+plupload实现的图片上传功能示例【支持实时预览】
2019/05/08 PHP
PHP过滤器 filter_has_var() 函数用法实例分析
2020/04/23 PHP
firefox浏览器不支持innerText的解决方法
2013/08/07 Javascript
Jquery设置attr的disabled属性控制某行显示或者隐藏
2014/09/25 Javascript
JavaScript阻止浏览器返回按钮的方法
2015/03/18 Javascript
被遗忘的javascript的slice() 方法
2015/04/20 Javascript
基于jQuery实现响应式圆形图片轮播特效
2015/11/25 Javascript
浅谈jquery选择器 :first与:first-child的区别
2016/11/20 Javascript
jQuery Easyui datagrid连续发送两次请求问题
2016/12/13 Javascript
详解webpack编译多页面vue项目的配置问题
2017/12/11 Javascript
vue项目中应用ueditor自定义上传按钮功能
2018/04/27 Javascript
最全vue的vue-amap使用高德地图插件画多边形范围的示例代码
2020/07/17 Javascript
vue中使用vue-pdf的方法详解
2020/09/05 Javascript
Python实现的数据结构与算法之链表详解
2015/04/22 Python
解析Python编程中的包结构
2015/10/25 Python
解决安装pycharm后不能执行python脚本的问题
2019/01/19 Python
Python实现的调用C语言函数功能简单实例
2019/03/13 Python
pytorch打印网络结构的实例
2019/08/19 Python
keras tensorflow 实现在python下多进程运行
2020/02/06 Python
基于Python的图像阈值化分割(迭代法)
2020/11/20 Python
python+playwright微软自动化工具的使用
2021/02/02 Python
一款恶搞头像特效的制作过程 利用css3和jquery
2014/11/21 HTML / CSS
Puritan’s Pride(普丽普莱)官方网站:美国最大最全的保健品公司之一
2016/10/23 全球购物
英国文胸专家:AmpleBosom.com
2018/02/06 全球购物
华为c/c++笔试题
2016/01/25 面试题
如何防止同一个帐户被多人同时登录
2013/08/01 面试题
篮球比赛策划方案
2014/06/05 职场文书
社会实践活动总结范文
2014/07/03 职场文书
社保委托书怎么写
2014/08/02 职场文书
安全月宣传标语
2014/10/07 职场文书
Mysql Online DDL的使用详解
2021/05/20 MySQL
Python时间操作之pytz模块使用详解
2022/06/14 Python