不至于同一台服务器还要走公网吧?
kodoffice配置不能走内网吗?
可以了已解决,域名需要解析到服务器的内网IP,不是127.0.0.1
不行,必须走公网,这不是逗吗, 同一台服务器必须走公网?
Lozen 用户看到的文档页面都是onlyoffice加载的,自然需要对外开放服务。若不想增加端口,可考虑做二级目录代理,解析地址填写http://server/web/
(服务检测3,4项报错可忽略)
map $http_x_forwarded_proto $the_scheme {
default $http_x_forwarded_proto;
"" $scheme;
}
map $http_x_forwarded_host $the_host {
default $http_x_forwarded_host;
"" $host;
}
map $http_upgrade $proxy_connection {
default upgrade;
"" close;
}
server {
listen 0.0.0.0:80;
server_tokens off;
location /web/ {
proxy_pass http://localhost:8001/;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $proxy_connection;
proxy_set_header X-Forwarded-Host $the_host:$server_port/web;
proxy_set_header X-Forwarded-Proto $the_scheme;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}
15 天 后
docker commpose为每一个容器指定ip,再定义host,直接将域名指向对应容器,SSH就指向反代服务器。