栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 系统运维 > 运维 > 服务器

使用nginx配置访问wgcloud的方法

服务器 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

使用nginx配置访问wgcloud的方法

nginx配置如下:

如http://172.17.188.27/wgcloud 

server {
 listen80;
 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 {
 listen80;
 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内容请搜索考高分网以前的文章或继续浏览下面的相关文章希望大家以后多多支持考高分网!

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/304876.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号