大叔资源备忘录

解决Ubuntu24布署Seafile局域网访问失败问题

在折腾安装完Seafile后,发现局域网无法访问Ubuntu24上的Seafile,只能通过Ubuntu本机127.0.0.2:8000访问

尝试过关闭防火墙等均无果,后来查阅相关资料,可以在安装目录下conf/gunicorn.conf.py文件配置路由

import os

daemon = True
workers = 5

#default localhost:8000
bind = "127.0.0.1:8000"

#pid
pids_dir = '/opt/seafile/installed/pids'
pidfile = os.path.join(pids_dir,'seahub.pid')

#for file upload,we need a longer timeout value(default is only 30s,too short)
timeout = 1200

limit_request_line = 8190
nano gunicorn.conf.py

默认是"127.0.0.1:8000"导致只能通过127.0.0.1:8000访问,将地址修改成Ubuntu的ip地址即可,我这里是192.168.1.3

# default localhost:8000
#bind = "127.0.0.1:8000"
bind = "192.168.1.3:8000"

重启服务即可

./seafile.sh restart
./seahub.sh restart
退出移动版