pig 通过nginx代理访问到首页后,点击登录不跳转

pig Github Action 2022年3月30日 12:29 49 查看原文

环境信息 (必填)

  • pigx版本: 3.7
  • 是否修改包名: 是

描述(无法理解工单,将直接关闭)

日志、截图、回显步骤 nginx 配置完成后,系统可以访问到登录页面,但点击登录不能跳转 nginx 配置文件内容: ```nginx server { listen 80; server_name localhost;

root /app/toilet-ui/dist/;

# 3.8 以后必须开启压缩
#gzip on;
#gzip_static on;
#gzip_min_length 1k;
#gzip_comp_level 4;
#gzip_proxied any;
#gzip_types text/plain text/xml text/css;
#gzip_vary on;
#gzip_disable "MSIE [1-6]\.(?!.*SV1)";
location ~* ^/(code|auth|admin|gen|daemon|tx|act|monitor|mp|job|pay|toilet|) {
   proxy_pass http://127.0.0.1:9999;
   #proxy_set_header Host $http_host;
   proxy_connect_timeout 15s;
   proxy_send_timeout 15s;
   proxy_read_timeout 15s;
   proxy_set_header X-Real-IP $remote_addr;
   proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}

} 不调整的后台日志如下:shell 106.117.76.208 - - [22/Apr/2020:19:20:16 +0800] "GET /css/page.eefac94c.css HTTP/1.1" 200 2045 "http://47.116.18.94/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:75.0) Gecko/20100101 Firefox/75.0" "-" 106.117.76.208 - - [22/Apr/2020:19:20:16 +0800] "GET /css/views.f3dd4201.css HTTP/1.1" 200 762 "http://47.116.18.94/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:75.0) Gecko/20100101 Firefox/75.0" "-" 106.117.76.208 - - [22/Apr/2020:19:20:16 +0800] "GET /js/chunk-2d0e4caf.313d4b12.js HTTP/1.1" 304 0 "http://47.116.18.94/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:75.0) Gecko/20100101 Firefox/75.0" "-" 106.117.76.208 - - [22/Apr/2020:19:20:16 +0800] "GET /js/chunk-9b04b7a8.ea912803.js HTTP/1.1" 304 0 "http://47.116.18.94/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:75.0) Gecko/20100101 Firefox/75.0" "-" 106.117.76.208 - - [22/Apr/2020:19:20:16 +0800] "GET /js/views.fe7b2667.js HTTP/1.1" 304 0 "http://47.116.18.94/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:75.0) Gecko/20100101 Firefox/75.0" "-" 106.117.76.208 - pig [22/Apr/2020:19:20:25 +0800] "POST /auth/oauth/token?randomStr=33921587554416746&code=10&grant_type=password HTTP/1.1" 499 0 "http://47.116.18.94/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:75.0) Gecko/20100101 Firefox/75.0" "-" 106.117.76.208 - - [22/Apr/2020:19:20:26 +0800] "GET /code?randomStr=80711587554426335 HTTP/1.1" 200 2687 "http://47.116.18.94/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:75.0) Gecko/20100101 Firefox/75.0" "-" 106.117.76.208 - pig [22/Apr/2020:19:20:45 +0800] "POST /auth/oauth/token?randomStr=80711587554426335&code=-1&grant_type=password HTTP/1.1" 504 167 "http://47.116.18.94/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:75.0) Gecko/20100101 Firefox/75.0" "-" 106.117.76.208 - - [22/Apr/2020:19:20:45 +0800] "GET /code?randomStr=76731587554445502 HTTP/1.1" 200 2858 "http://47.116.18.94/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:75.0) Gecko/20100101 Firefox/75.0" "-" 77.21.144.121 - - [22/Apr/2020:19:32:26 +0800] "GET / HTTP/1.1" 200 2440 "-" "-" "-" 106.117.76.208 - pig [22/Apr/2020:19:36:49 +0800] "POST /auth/oauth/token?randomStr=76731587554445502&code=10&grant_type=password HTTP/1.1" 428 49 "http://47.116.18.94/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:75.0) Gecko/20100101 Firefox/75.0" "-" 106.117.76.208 - - [22/Apr/2020:19:36:49 +0800] "GET /code?randomStr=32511587555409882 HTTP/1.1" 200 3078 "http://47.116.18.94/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:75.0) Gecko/20100101 Firefox/75.0" "-" 106.117.76.208 - pig [22/Apr/2020:19:37:07 +0800] "POST /auth/oauth/token?randomStr=32511587555409882&code=0&grant_type=password HTTP/1.1" 504 167 "http://47.116.18.94/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:75.0) Gecko/20100101 Firefox/75.0" "-" 106.117.76.208 - - [22/Apr/2020:19:37:07 +0800] "GET /code?randomStr=25431587555428210 HTTP/1.1" 200 2860 "http://47.116.18.94/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:75.0) Gecko/20100101 Firefox/75.0" "-"

```

回答
6 条回答

根据日志得知: - 你刷到了验证码: 说明网关正常 - 但是登录没有成功,错误是504 (Gateway Timeout):说明auth 服务没能响应请求

因此可以先去nacos看看auth服务的状态

帮助楼主重新调整一下格式

0、首先你要先截图。
1、后端服务正常注册nacos ?
2、hosts配置域名?
3、nginx服务器是否正常访问后端ping 能通?
4、登录页面验证码是否正常出来呢?
4、环境搭建是docker吗?

截图啊

请求超时了

F12 看 请求日志 提示什么

热门问题
相关推荐
推荐分类