sophon配置外网访问步骤(双网卡同理)

  其他常见问题
内容纲要

概要描述

sophon 2.X版本的内外网访问,修改步骤。

详细说明


  1. 找到并修改安装实例sophonX的配置文件,目录为 /etc/sophonX/conf/ui/default
  2. 修改以下几项X-Forwarded-Proto、X-Forwarded-For、X-Forwarded-Port,其意义分别为协议、IP(或域名)、端口,修改为浏览器上访问Sophon的协议、IP(或域名)、端口值
    location /gateway/ {
    proxy_pass http://tw-node3228:8700/;
    proxy_http_version 1.1;
    proxy_set_header X-Forwarded-Proto https;
    proxy_set_header X-Forwarded-For 172.16.3.128;
    proxy_set_header X-Forwarded-Port 8066;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "upgrade";
    proxy_set_header Host $host:$server_port;
    proxy_cache_bypass $http_upgrade;
    proxy_read_timeout 36000s;
    }
    location ~ ^/(cas|api){
    proxy_pass http://tw-node3228:8700;
    proxy_http_version 1.1;
    proxy_set_header X-Forwarded-Proto https;
    proxy_set_header X-Forwarded-For 172.16.3.128;
    proxy_set_header X-Forwarded-Port 8066;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "upgrade";
    proxy_set_header Host $host:$server_port;
    proxy_cache_bypass $http_upgrade;
    }
    location /nb-proxy/ {
    proxy_pass http://tw-node41:8709/nb-proxy/;
    proxy_http_version 1.1;
    proxy_set_header X-Forwarded-Proto https;
    proxy_set_header X-Forwarded-For 172.16.3.128;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "upgrade";
    proxy_set_header Host $host:$server_port;
    proxy_cache_bypass $http_upgrade;
    }
  3. 若CAS也配置了内外网,则需在配置文件 /etc/sophonX/conf/user/user.conf 修改(或添加)配置项 cas.service.web.prefix=https://180.167.8.36:8393/cas(值为浏览器访问cas的地址
  1. 重启整个sophon服务

这篇文章对您有帮助吗?

平均评分 0 / 5. 次数: 0

尚无评价,您可以第一个评哦!

非常抱歉,这篇文章对您没有帮助.

烦请您告诉我们您的建议与意见,以便我们改进,谢谢您。