|
通过nginx的端口访问,实现跳转,页面一直在转圈
node_106.55.179.217.json为
"enable": true,
"center": {
"enable": true,
"order": 0.0,
"sslEnable": false,
"port": 8080.0,
"httpProtocol": "",
"proxyHost": "106.55.179.217",
"proxyPort": 8080.0,
"###enable": "是否启用###",
"###order": "center节点顺序,顺序排列0,1,2...###",
"###sslEnable": "是否启用ssl传输加密,如果启用将使用config/keystore文件作为密钥文件.使用config/token.json文件中的sslKeyStorePassword字段为密钥密码,sslKeyManagerPassword为管理密码.###",
"###port": "端口,center服务器端口,默认20030###",
"###httpProtocol": "对外http访问协议,http/https###",
"###proxyHost": "代理主机,当服务器是通过apache/nginx等代理服务器映射到公网或者通过路由器做端口映射,在这样的情况下需要设置此地址以标明公网访问地址.###",
"###proxyPort": "代理端口,当服务器是通过apache/nginx等代理服务器映射到公网或者通过路由器做端口映射,在这样的情况下需要设置此地址以标明公网访问端口.###",
"###extension": "扩展设置.###"
},
"application": {
"enable": true,
"port": 8080.0,
"sslEnable": false,
"proxyHost": "106.55.179.217",
"proxyPort": 8080.0,
"includes": [],
"excludes": [],
"###enable": "是否启用###",
"###port": "http/https端口,负责向前端提供数据访问接口.默认为20020端口.###",
"###sslEnable": "是否启用ssl传输加密,如果启用将使用config/keystore文件作为密钥文件.使用config/token.json文件中的sslKeyStorePassword字段为密钥密码,sslKeyManagerPassword为管理密码.###",
"###proxyHost": "代理主机,当服务器是通过apache/nginx等代理服务器映射到公网或者通过路由器做端口映射,在这样的情况下需要设置此地址以标明公网访问地址.###",
"###proxyPort": "代理端口,当服务器是通过apache/nginx等代理服务器映射到公网或者通过路由器做端口映射,在这样的情况下需要设置此地址以标明公网访问端口.###",
"###includes": "承载的应用,在集群环境下可以选择仅承载部分应用以降低服务器负载,可以使用*作为通配符.###",
"###excludes": "选择不承载的应用,和includes的值配合使用可以选择或者排除承载的应用,可以使用*作为通配符.###",
"###extension": "扩展设置.###"
},
"web": {
"enable": true,
"port": 8080.0,
"sslEnable": false,
"proxyHost": "106.55.179.217",
"proxyPort": 8080.0,
"proxyCenterEnable": true,
"proxyApplicationEnable": true,
"proxyTimeOut": 300.0,
"###enable": "是否启用###",
"###port": "http/https端口,用户输入网址后实际访问的第一个端口.http协议默认为80端口,https默认为8080.0端口.###",
nginx配置文件为
http {
include mime.types;
default_type application/octet-stream;
charset utf-8;
#access_log logs/access.log main;
client_max_body_size 100m; # 数据包大小限制
sendfile on;
tcp_nopush on;
keepalive_timeout 65;
#gzip on;
upstream o2Server { # Server: 分发名
server 106.55.179.217:8080 weight=5 max_fails=3 fail_timeout=10s; # 分发地址1
server 106.55.188.250:8080 weight=5 max_fails=3 fail_timeout=10s; # 分发地址2
server 175.178.94.26:8080 weight=5 max_fails=3 fail_timeout=10s; # 分发地址2
}
server {
listen 8081;
server_name 106.55.179.217;
return 301 https://$host$request_uri;
}
server {
listen 443 ssl;
server_name 106.55.179.217;
ssl_certificate_key /etc/pki/CA/private/server.key;
ssl_certificate /etc/pki/CA/certs/server.crt;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:HIGH:!aNULL:!MD5:!RC4:!DHE;
ssl_prefer_server_ciphers on;
location / {
root html;
index index.html;
proxy_pass http://o2Server;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
}
}
}
|
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有账号?立即注册
x
|