您当前的位置:首页 > 网站建设 > 网站维护
| php | asp | css | H5 | javascript | Mysql | Dreamweaver | Delphi | 网站维护 | 帝国cms | React | 考试系统 | ajax | jQuery |

使用nginx配置访问wgcloud的方法

51自学网 2022-07-04 11:31:57
  网站维护

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;        }

下载地址:
详解Tomcat常用的过滤器
docker部署springboot和vue项目的实现步骤
51自学网,即我要自学网,自学EXCEL、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。
京ICP备13026421号-1