mirror of
https://github.com/electerm/electerm-web-docker.git
synced 2026-04-24 21:25:50 +03:00
[GH-ISSUE #3] websocket隔一段时间断开 #3
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/electerm-web-docker#3
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @noxhal on GitHub (Jan 7, 2024).
Original GitHub issue: https://github.com/electerm/electerm-web-docker/issues/3
nginx反代docker部署的electerm,ssh连接上服务器后,过一会就自动断了,windows客户端版本没有这个问题,请问是缺什么配置吗?
@zxdong262 commented on GitHub (Jan 7, 2024):
保活间隔时间设为0试试?
@noxhal commented on GitHub (Jan 7, 2024):
不行,不到一分钟就自动断开了
@zxdong262 commented on GitHub (Jan 8, 2024):
可以发一下nginx配置吗,我试试
@noxhal commented on GitHub (Jan 10, 2024):
server {
listen [::]:80;
server_name xxx;
location / {
proxy_pass http://[::1]:8880/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header REMOTE-HOST $remote_addr;
}
location /common/s {
proxy_pass http://[::1]:8880;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
location /terminals/ {
proxy_pass http://[::1]:8880;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
location /sftp/ {
proxy_pass http://[::1]:8880;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
}
@zxdong262 commented on GitHub (Jan 10, 2024):
试试这样看看可以不?
@zxdong262 commented on GitHub (Jan 10, 2024):
应该是这个问题,参考上面的设置
@noxhal commented on GitHub (Jan 10, 2024):
还是1分钟左右ssh就断了,我换个服务器试试,那个服务器是v6机器,还用frp转发到内网服务了
@noxhal commented on GitHub (Jan 11, 2024):
我换了一台有ipv4的公网机器,用docker启动,不用nginx反代,ip端口访问,连上ssh后,什么都不操作,大概等5分钟也会自动断开
docker run --init -d --restart=always -v /home/electerm-web-data:/home/electerm/data
-e "DB_PATH=/home/electerm/data"
-e "HOST=0.0.0.0"
-e "SERVER=http://ip:8082"
-e "SERVER_PASS=xxx"
-e "ENABLE_AUTH=1"
-p 8082:5577
zxdong262/electerm-web
@zxdong262 commented on GitHub (Jan 17, 2024):
我试了,几个小时也没有断,也许有网络波动?
@irfanMiral commented on GitHub (Jan 22, 2024):
Can you try this;
Change this line
proxy_pass http://[::1]:8880/;
to
proxy_pass http://[::1]:8880;
I had same issue, it seems SERVER value should be;
https://HOST:PORT not https://HOST:PORT/
or this if you don't use ssl
http://HOST:PORT not http://HOST:PORT/
@125540947 commented on GitHub (Apr 9, 2024):
求一个搭建教程。。。官方的看不懂