解决nginx给phpmyadmin套娃SSL之后phpmyadmin登录界面弹出警告

当phpMyAdmin显示HTTPS指示不匹配时,可能导致功能异常或安全风险。解决方法是在服务器配置中添加`proxy_set_header X-Forwarded-Proto $scheme;`参数。示例配置为监听443端口的服务器块中,将phpMyAdmin的代理传递设置为正确指示HTTPS。此方案来源于Stack Overflow。

phpMyAdmin 输出: There is mismatch between HTTPS indicated on the server and client.
This can lead to non working phpMyAdmin or a security risk.
Please fix your server configuration to indicate HTTPS properly.

解决:
配置里添加参数:proxy_set_header X-Forwarded-Proto $scheme;
示范:

 server {
  listen 443;
  server_name _;
  #其它SSL证书配置
  
  location / {
    proxy_pass http://path/to/phpmyadmin;
    proxy_set_header X-Forwarded-Proto $scheme;
  }
}

解决方案来源:https://stackoverflow.com/questions/56655548/there-is-mismatch-between-https-indicated-on-the-server-and-client

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值