• 首页

  • 归档
小 黑 捡 方 块
小 黑 捡 方 块

小黑捡方块

获取中...

07
12
nginx

Springboot+Nginx+certbot重定向400错误解决

发表于 2019-07-12 • 被 606 人看爆

问题表现:

  1. 使用sudo certbot --nginx配置证书后访问首页没问题
  2. 访问管理页面由于需要登录自动重定向到登录页面出现400错误,如访问:https://maidrem.hupubao.win/admin重定向到http://maidrem.hupubao.win:443/admin/login就报400了

解决方案:

  1. Springboot配置application.yaml中增加配置
server:
  use-forward-headers: true
  1. Nginx 配置增加
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Port $server_port;
分享到:
docker启动后外网和主机死活访问不到springboot项目
克隆下来的idea插件如何运行
  • 文章目录
  • 站点概览
小黑捡方块

帅哥小黑捡方块

Github Email RSS
看爆 Top5
  • jenkins通过ssh连接失败:Failed to add SSH key. Message [invalid privatekey 1,211次看爆
  • ConcurrentHashMap核心部分源码注释 1,168次看爆
  • docker运行的jenkins在构建项目并打包成docker镜像时问题总结 1,123次看爆
  • docker启动后外网和主机死活访问不到springboot项目 661次看爆
  • Springboot+Nginx+certbot重定向400错误解决 607次看爆
蜀ICP备19040029号

Copyright © 2021 小黑捡方块 ·

Proudly published with Halo · Theme by fyang · 站点地图