4.5K Star 42.9K Fork 12.6K

GVPlengleng / pig

 / 详情

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

已完成
成员
创建于  
2020-06-07 17:52

环境信息 (必填)

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

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

日志、截图、回显步骤
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;
    }
}

不调整的后台日志如下:

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)

F12 看 请求日志 提示什么

Github Action 创建了任务
Github Action 关联仓库设置为pig4cloud.com/pig
展开全部操作日志

请求超时了

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

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

根据日志得知:

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

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

Github Action 任务状态待办的 修改为已完成

登录 后才可以发表评论

状态
负责人
里程碑
Pull Requests
关联的 Pull Requests 被合并后可能会关闭此 issue
分支
开始日期   -   截止日期
-
置顶选项
优先级
参与者(1)
393021 springcloud777 1591517090
Java
1
https://gitee.com/log4j/pig.git
git@gitee.com:log4j/pig.git
log4j
pig
pig

搜索帮助