使用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配置proxy_pass中url末尾带/与不带/的区别详解
Mar 31 Servers
Nginx域名转发使用场景代码实例
Mar 31 Servers
nginx location优先级的深入讲解
Mar 31 Servers
制作能在nginx和IIS中使用的ssl证书
Jun 21 Servers
详解Nginx 被动检查服务器的存活状态
Oct 16 Servers
深入解析Apache Hudi内核文件标记机制
Mar 31 Servers
Mac电脑OS系统下安装Nginx的详细教程
Apr 14 Servers
nginx配置之并发频次限制
Apr 18 Servers
Nginx限流和黑名单配置
May 20 Servers
Nginx开源可视化配置工具NginxConfig使用教程
Jun 21 Servers
Windows server 2012 NTP时间同步的实现
Jun 25 Servers
ubuntu端向日葵键盘输入卡顿问题及解决
Dec 24 Servers
Nginx反向代理配置的全过程记录
制作能在nginx和IIS中使用的ssl证书
解析在浏览器地址栏输入一个URL后发生了什么
Linux中Nginx的防盗链和优化的实现代码
详解nginx进程锁的实现
Jun 14 #Servers
Nginx四层负载均衡的配置指南
配置nginx 重定向到系统维护页面
Jun 08 #Servers
You might like
PHP中ADODB类详解
2008/03/25 PHP
用php获取远程图片并把它保存到本地的代码
2008/04/07 PHP
浅析Dos下运行php.exe,出现没有找到php_mbstring.dll 错误的解决方法
2013/06/29 PHP
迅速确定php多维数组的深度的方法
2014/01/07 PHP
win7系统配置php+Apache+mysql环境的方法
2015/08/21 PHP
php生成带logo二维码方法小结
2016/04/08 PHP
学习PHP的数组总结【经验】
2016/05/05 PHP
PHP之图片上传类实例代码(加了缩略图)
2016/06/30 PHP
php调用云片网接口发送短信的实现方法
2017/10/25 PHP
HR vs CL BO3 第一场 2.13
2021/03/10 DOTA
JQuery 操作Javascript对象和数组的工具函数小结
2010/01/22 Javascript
自定义ExtJS控件之下拉树和下拉表格附源码
2013/10/15 Javascript
利用进制转换压缩数字函数分享
2014/01/02 Javascript
jQuery的cookie插件实现保存用户登陆信息
2014/04/15 Javascript
javascript实现的元素拖动函数宿主为浏览器
2014/07/21 Javascript
jQuery+slidereveal实现的面板滑动侧边展出效果
2015/03/14 Javascript
分享12个非常实用的JavaScript小技巧
2016/05/11 Javascript
手机软键盘弹出时影响布局的解决方法
2016/12/15 Javascript
Vue自定义指令实现checkbox全选功能的方法
2018/02/28 Javascript
使用react render props实现倒计时的示例代码
2018/12/06 Javascript
JS操作字符串转数字的常见方法示例
2019/10/29 Javascript
python使用百度翻译进行中翻英示例
2014/04/14 Python
对比Python中__getattr__和 __getattribute__获取属性的用法
2016/06/21 Python
python实现应用程序在右键菜单中添加打开方式功能
2017/01/09 Python
python实现n个数中选出m个数的方法
2018/11/13 Python
Python3爬虫学习之应对网站反爬虫机制的方法分析
2018/12/12 Python
Django实现跨域请求过程详解
2019/07/25 Python
python获取网络图片方法及整理过程详解
2019/12/20 Python
使用Python脚本从文件读取数据代码实例
2020/01/19 Python
matlab 计算灰度图像的一阶矩,二阶矩,三阶矩实例
2020/04/22 Python
大学新生军训个人的自我评价
2013/10/03 职场文书
室内设计专业个人的自我评价
2013/10/19 职场文书
蜗居观后感
2015/06/11 职场文书
幼儿园大班教学反思
2016/03/02 职场文书
古诗文之爱国名句(77句)
2019/09/24 职场文书
Nginx隐藏式跳转(浏览器URL跳转后保持不变)
2022/04/07 Servers