当前位置: 首页 > news >正文

心悦俱乐部官方网站怎么做任务南昌地宝网二手房出售信息

心悦俱乐部官方网站怎么做任务,南昌地宝网二手房出售信息,合肥专业网站建设,高清视频线和音频线的接口类型IdentityServer 部署踩坑记Intro周末终于部署了 IdentityServer 以及 IdentityServerAdmin 项目#xff0c;踩了几个坑#xff0c;在此记录分享一下。部署架构项目是基于 IdentityServerAdmin 项目修改的#xff0c;感谢作者的开源付出#xff0c;有需要 IdentityServer 管… IdentityServer 部署踩坑记Intro周末终于部署了 IdentityServer 以及 IdentityServerAdmin 项目踩了几个坑在此记录分享一下。部署架构项目是基于 IdentityServerAdmin 项目修改的感谢作者的开源付出有需要 IdentityServer 管理需求的可以关注一下觉得好用的可以给个 star 支持一下 https://github.com/skoruba/IdentityServer4.Admin实际部署的有两个服务一个是 IdentityServer 项目(https://id.weihanli.xyz)一个是 IdentityAdmin 项目(https://id-admin.weihanli.xyz)。两个服务都是部署在一台服务器上这一台服务器上部署一个单节点的 kubernetes两个服务都是部署在 k8s 上并通过 NortPort 的方式对外提供服务外面有一层 nginx 做了请求转发同时提供对外 https 的支持。最初的 nginx 配置如下server {listen 443;ssl_certificate /home/pipeline/.acme.sh/*.weihanli.xyz/*.weihanli.xyz.cer;ssl_certificate_key /home/pipeline/.acme.sh/*.weihanli.xyz/*.weihanli.xyz.key;server_name id.weihanli.xyz;location / {proxy_pass http://172.17.0.2:31210;proxy_set_header X-Real-IP $remote_addr;proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;} } server {listen 443;ssl_certificate /home/pipeline/.acme.sh/*.weihanli.xyz/*.weihanli.xyz.cer;ssl_certificate_key /home/pipeline/.acme.sh/*.weihanli.xyz/*.weihanli.xyz.key;server_name id-admin.weihanli.xyz;location / {proxy_pass http://172.17.0.2:31211;proxy_set_header X-Real-IP $remote_addr;proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;} } IdentityServer重定向到内网地址部署起来之后IdentityServer 可以访问但是 IdentityAdmin 访问的时候会重定向到 IdentityServer 去登录在发生重定向的时候会重定向到内网地址重定向到了 172.17.0.1:31210 这个内网地址这个地址是一个内网地址公网肯定是没有办法访问的在网上 Google 了半天发现有个类似的问题 网络回流NAT Loopback/ Hairpin NAT大概就是在同一网段的内网中的两个服务通信的时候通过公网域名没有办法访问会转换成内网IP访问所以发生重定向的时候会出现原本是域名重定向但是却变成了内网IP不确定我的这种情况是不是属于网络回流的情况有网络大佬的话可以帮忙分析一下万分感谢因为使用了 nginx 并且转发后的内网 IP 地址是 nginx 转发到的请求地址所以又 Google 了 nginx proxy redirect 关键词最后找到一个解决方案 https://unix.stackexchange.com/questions/290141/nginx-reverse-proxy-redirection最后生效的 nginx 完整配置如下server {listen 443 http2;ssl_certificate /home/pipeline/.acme.sh/*.weihanli.xyz/*.weihanli.xyz.cer;ssl_certificate_key /home/pipeline/.acme.sh/*.weihanli.xyz/*.weihanli.xyz.key;server_name id-admin.weihanli.xyz;location / {proxy_pass http://172.17.0.2:31211;proxy_redirect http://172.17.0.2:31210/ https://id.weihanli.xyz/;proxy_set_header Host $host;proxy_set_header Referer $http_referer;proxy_set_header X-Real-IP $remote_addr;proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;} } 增加了上面的配置之后再发生重定向的时候地址就是正确的了不再是一个内网IP 了Invalid TokenIdentity Server 重定向的问题解决之后马上就出现了新的问题。。。首先在 Identity Server 登录成功之后返回到 IdentityAdmin 的时候会报错查看日志可以看到是 token 不合法的问题起初是 issuer 不对的问题我想可能是 issuer 可能 http/https 不一致的问题于是增加了一个配置直接在注册 IdentityServer 的时候使用指定的 issuer 想着这样就不会有 http/https 的问题于是重新部署重新尝试之后token 还是有问题日志显示是token 签名验证错误这时不经意之间看了一眼 IdentityServer 的 发现文档打开之后发现里面的各种 endpoint 都是 http 的后来发现 IdentityServer 有一个 PublicOrigin 的配置把这个配置配置成 https://id.weihanli.xyz 之后就没有 invalid token 之类的错误了再看发现文档的时候endpoint 也是基于 https 的了。Identity-Admin 502在 IdentityServer 登录成功之后重定向到 IdentityAdmin 的时候 502但是服务是存在的 在日志里只找到下面这样的错误日志Microsoft.IdentityModel.Protocols.OpenIdConnect.OpenIdConnectProtocolException: Message contains error: invalid_grant , error_description: error_description is null, error_uri: error_uri is null 在网上 Google 之后找到了这个issuehttps://github.com/IdentityServer/IdentityServer4/issues/1670尝试了下面这个解决方案解决了是因为重定向的时候请求信息太大了nginx 中 IdentityAdmin 项目增加配置proxy_buffer_size 128k; proxy_buffers 4 256k; proxy_busy_buffers_size 256k; 修改之后执行 sudo nginx-s reload 重新加载配置之后就正常了More最后现在在用的有效的完整的 nginx 配置如下server {listen 443 http2;ssl_certificate /home/pipeline/.acme.sh/*.weihanli.xyz/*.weihanli.xyz.cer;ssl_certificate_key /home/pipeline/.acme.sh/*.weihanli.xyz/*.weihanli.xyz.key;server_name id.weihanli.xyz;location / {proxy_pass http://172.17.0.2:31210;proxy_redirect off;proxy_set_header Host $host;proxy_set_header Referer $http_referer;proxy_set_header X-Real-IP $remote_addr;proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;} } server {listen 443 http2;ssl_certificate /home/pipeline/.acme.sh/*.weihanli.xyz/*.weihanli.xyz.cer;ssl_certificate_key /home/pipeline/.acme.sh/*.weihanli.xyz/*.weihanli.xyz.key;server_name id-admin.weihanli.xyz;location / {proxy_pass http://172.17.0.2:31211;proxy_redirect http://172.17.0.2:31210/ https://id.weihanli.xyz/;proxy_buffer_size 128k;proxy_buffers 4 256k;proxy_busy_buffers_size 256k;proxy_set_header Host $host;proxy_set_header Referer $http_referer;proxy_set_header X-Real-IP $remote_addr;proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;} } Referencehttps://github.com/IdentityServer/IdentityServer4https://github.com/skoruba/IdentityServer4.Adminhttps://unix.stackexchange.com/questions/290141/nginx-reverse-proxy-redirectionhttps://github.com/IdentityServer/IdentityServer4/issues/1670http://docs.identityserver.io/en/latest/topics/deployment.html#typical-architecturehttp://docs.identityserver.io/en/latest/reference/options.htmlhttps://github.com/OpenReservation/Identity
http://www.huolong8.cn/news/432683/

相关文章:

  • 松原市城乡建设局网站怎样做平台销售
  • wordpress纯代码注册验证廊坊百度seo公司
  • 店铺的网站怎么做关于校园推广的软文
  • 360免费做网站电话seo顾问多少钱
  • 婴儿衣服做的网站好做网站用php还是python
  • 城市门户网站网站优化前景
  • 云南网站建设优化网站建设栏目分级
  • 专业网站建设案例网站建设我要自学网
  • wordpress分类搜索semseo是什么意思
  • 园区做网站湖州企业网站制作
  • 网站开发会遇到哪些问题网站分析与优化的文章
  • 招聘网站预算怎么做商丘市今天确诊名单
  • photoshop做网站企石网站仿做
  • 上海联通 网站备案想做网站去哪里做
  • 公司网站制作费用申请沧州做网站多少钱
  • 做网站推广选择什么最好公司起名字大全免费4个字
  • 做电商网站需要多少钱广州高端网站定制开发价格
  • 如何做自己产品网站营销推广模式
  • 做网站淄博weex做网站
  • 百度云免费做网站登陆插件wordpress
  • 网站建设百度推广总结免费网页制作成app
  • 看房自己的网站建设多少钱python网站开发 pdf
  • 高清网站建设的好处seo外包方案
  • 临沭县住房和城乡建设局网站虚拟主机怎么使用
  • 上海大金空调网站建设可以发锚文本的网站
  • 网站如何悬挂备案号盐城网站开发代理商
  • 阿里云里做网站能上百度首页么wordpress jw
  • 深圳网站建设制作哪家便宜网页游戏推荐排行
  • 建设银行网站为什么登不上怎么样下载app软件
  • 丹阳网站设计网站建设销售话术