网站首页 > 精选教程 正文
这篇文章主要介绍了使用nginx配置访问wgcloud的方法,在这里大家需要记得agent的配置文件项serverUrl的80端口也要写上,需要的朋友可以参考下 |
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 | 《Linux就该这么学》 (linuxprobe.com)
猜你喜欢
- 2024-09-24 2.2w Star,这是一款什么样的Nginx可视化配置神器?
- 2024-09-24 还在手撸 Nginx 配置?试试这款可视化配置工具吧,真心强大
你 发表评论:
欢迎- 最近发表
-
- 绝对新惊喜!4款王者级别的办公软件,免费又实用
- 再见WPS!微软新出的免费Office软件,我一用就爱上了
- Deepseek+通义千问,一分钟免费生成PPT
- 手机也能修改PPT?还能投屏?3000万用户的ToDesk有多少人不知道
- 简单!如何用Deepseek制作课件?保姆级教程一遍就懂!
- 你会移动办公吗?iPhone 上的免费 Office 软件长这模样
- 超好用的14款免费视频编辑软件强烈推荐!剪辑达人必备!(2022)
- 一键免费转换PPT、Excel和Word文档,无需下载软件
- DeepSeek +功能扩展,实现一键生成PPT功能,完全免费的。
- 拜拜WPS?微软这款全新的三合一Office,免费无广告,真让人惊艳
- 标签列表
-
- nginx反向代理 (57)
- nginx日志 (56)
- nginx限制ip访问 (62)
- mac安装nginx (55)
- java和mysql (59)
- java中final (62)
- win10安装java (72)
- java启动参数 (64)
- java链表反转 (64)
- 字符串反转java (72)
- java逻辑运算符 (59)
- java 请求url (65)
- java信号量 (57)
- java定义枚举 (59)
- java字符串压缩 (56)
- java中的反射 (59)
- java 三维数组 (55)
- java插入排序 (68)
- java线程的状态 (62)
- java异步调用 (55)
- java中的异常处理 (62)
- java锁机制 (54)
- java静态内部类 (55)
- java怎么添加图片 (60)
- java 权限框架 (55)
本文暂时没有评论,来添加一个吧(●'◡'●)