使用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反爬虫策略,防止UA抓取网站
Mar 31 Servers
详解nginx进程锁的实现
Jun 14 Servers
Apache Linkis 中间件架构及快速安装步骤
Mar 16 Servers
CentOS下安装Jenkins的完整步骤
Apr 07 Servers
Windows Server 2012 修改远程默认端口3389的方法
Apr 28 Servers
Win10 Anaconda安装python-pcl
Apr 29 Servers
nginx配置限速限流基于内置模块
May 02 Servers
阿里云国际版 使用Nginx作为HTTPS转发代理服务器
May 11 Servers
服务器间如何实现文件共享
May 20 Servers
git中cherry-pick命令的使用教程
Jun 25 Servers
彻底卸载VMware虚拟机的超详细步骤记录
Jul 15 Servers
Valheim服务器 Mod修改安装教程 【ValheimPlus】
Dec 24 Servers
Nginx反向代理配置的全过程记录
制作能在nginx和IIS中使用的ssl证书
解析在浏览器地址栏输入一个URL后发生了什么
Linux中Nginx的防盗链和优化的实现代码
详解nginx进程锁的实现
Jun 14 #Servers
Nginx四层负载均衡的配置指南
配置nginx 重定向到系统维护页面
Jun 08 #Servers
You might like
PHP连接MySQL查询结果中文显示乱码解决方法
2013/10/25 PHP
PHP开发的微信现金红包功能示例
2017/06/29 PHP
laravel解决迁移文件一次删除创建字段报错的问题
2019/10/24 PHP
脚本收藏iframe
2006/07/21 Javascript
让任务管理器中的CPU跳舞的js代码
2008/11/01 Javascript
在IE 浏览器中使用 jquery的fadeIn() 效果 英文字符字体加粗
2011/06/02 Javascript
js中的getAttribute方法使用示例
2014/08/01 Javascript
js图片模糊切换显示特效的方法
2015/02/17 Javascript
js实现背景图片感应鼠标变化的方法
2015/02/28 Javascript
所见即所得的富文本编辑器bootstrap-wysiwyg使用方法详解
2016/05/27 Javascript
Three.js学习之网格
2016/08/10 Javascript
javascript定时器取消定时器及优化方法
2017/07/08 Javascript
Javascript实现时间倒计时效果
2017/07/15 Javascript
ES6入门教程之let、const的使用方法
2019/04/13 Javascript
Mpvue中使用Vant Weapp组件库的方法步骤
2019/05/16 Javascript
微信小程序实现电子签名功能
2020/07/29 Javascript
Javascript Symbol原理及使用方法解析
2020/10/22 Javascript
在Django的URLconf中使用命名组的方法
2015/07/18 Python
Python工程师面试题 与Python Web相关
2016/01/14 Python
Python 数据结构之旋转链表
2017/02/25 Python
Python数据结构与算法之字典树实现方法示例
2017/12/13 Python
Python3实现的画图及加载图片动画效果示例
2018/01/19 Python
python 自动批量打开网页的示例
2019/02/21 Python
python logging模块书写日志以及日志分割详解
2019/07/22 Python
python smtplib发送多个email联系人的实现
2020/10/09 Python
总结30个CSS3选择器
2017/04/13 HTML / CSS
世界上最大的乐谱选择:Sheet Music Plus
2020/01/18 全球购物
某公司面试题
2012/03/05 面试题
英语自我评价范文
2014/01/24 职场文书
期末评语大全
2014/05/04 职场文书
员工合理化建议书
2014/05/19 职场文书
体育运动口号
2014/06/09 职场文书
音乐节策划方案
2014/06/09 职场文书
2015年元旦主持词结束语
2014/12/14 职场文书
2015年保送生自荐信
2015/03/24 职场文书
暖春观后感
2015/06/08 职场文书