使用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服务器如何设置url链接
Mar 31 Servers
Nginx反向代理及负载均衡如何实现(基于linux)
Mar 31 Servers
nginx中proxy_pass各种用法详解
Nov 07 Servers
Nginx 路由转发和反向代理location配置实现
Nov 11 Servers
CentOS7安装GlusterFS集群以及相关配置
Apr 12 Servers
Nginx 匹配方式
May 15 Servers
nginx lua 操作 mysql
May 15 Servers
Linux磁盘管理方法介绍
Jun 01 Servers
Windows server 2022创建创建林、域树、子域的步骤
Jun 25 Servers
教你nginx跳转配置的四种方式
Jul 07 Servers
VMware虚拟机安装 Windows Server 2022的详细图文教程
Sep 23 Servers
解决ubuntu安装软件时,status-code=409报错的问题
Dec 24 Servers
Nginx反向代理配置的全过程记录
制作能在nginx和IIS中使用的ssl证书
解析在浏览器地址栏输入一个URL后发生了什么
Linux中Nginx的防盗链和优化的实现代码
详解nginx进程锁的实现
Jun 14 #Servers
Nginx四层负载均衡的配置指南
配置nginx 重定向到系统维护页面
Jun 08 #Servers
You might like
php adodb连接不同数据库
2009/03/19 PHP
Discuz!下Memcache缓存实现方法
2010/05/28 PHP
PHP中fwrite与file_put_contents性能测试代码
2013/08/02 PHP
php自定义apk安装包实例
2014/10/20 PHP
php使用pear_smtp发送邮件
2016/04/15 PHP
[原创]php简单隔行变色功能实现代码
2016/07/09 PHP
Javascript - HTML的request类
2006/07/15 Javascript
newxtree.js代码
2007/03/13 Javascript
js下关于onmouseout、事件冒泡的问题经验小结
2010/12/09 Javascript
JSON无限折叠菜单编写实例
2013/12/16 Javascript
JavaScript制作windows经典扫雷小游戏
2015/03/31 Javascript
JS实现新浪博客左侧的Blog管理菜单效果代码
2015/10/22 Javascript
js实现分割上传大文件
2016/03/09 Javascript
快速解决jquery.touchSwipe左右滑动和垂直滚动条冲突
2016/04/15 Javascript
实用jquery操作表单元素的简单代码
2016/07/04 Javascript
jQuery实现页面顶部下拉广告
2016/12/30 Javascript
js实现下拉菜单效果
2017/03/01 Javascript
js随机生成一个验证码
2017/06/01 Javascript
手写Node静态资源服务器的实现方法
2018/03/20 Javascript
layer关闭弹出窗口触发表单提交问题的处理方法
2019/09/25 Javascript
Vue中使用matomo进行访问流量统计的实现
2019/11/05 Javascript
ant design实现圈选功能
2019/12/17 Javascript
Python入门篇之字符串
2014/10/17 Python
用Python编写一个简单的俄罗斯方块游戏的教程
2015/04/03 Python
非递归的输出1-N的全排列实例(推荐)
2017/04/11 Python
详解Django中六个常用的自定义装饰器
2018/07/04 Python
Python使用post及get方式提交数据的实例
2019/01/24 Python
python进行参数传递的方法
2020/05/12 Python
Win 10下Anaconda虚拟环境的教程
2020/05/18 Python
python Paramiko使用示例
2020/09/21 Python
Blue Nile台湾:钻石珠宝商,订婚首饰、结婚戒指和精品首饰
2017/11/24 全球购物
科颜氏英国官网:Kiehl’s英国
2019/11/20 全球购物
小班开学寄语
2014/04/04 职场文书
党员干部学习心得体会
2016/01/23 职场文书
市场营销计划书
2019/04/24 职场文书
python数据库批量插入数据的实现(executemany的使用)
2021/04/30 Python