由于日常工作关系,想搭建一个内部文件系统,所以就选择了seafile。
环境:
硬件:Minowboard MAX开发板
系统:Windows 10
一、windows上安装seafile
详见seafile官网
二、发现问题!!!
网页上可以正常使用seafile,但是客户端登录seafile后不能同步文件,始终显示“connecting server”。经过检查后发现,主链接的/seahttp路由始终显示404 ERROR。经过观察之后,找到如下解决方法。
1、安装nginx,做反向
博主使用phpstudy自带的nginx。
2、编辑vhosts.conf
主链接:file.tools.claves.me
下载链接:filedown.tools.claves.me
-
server
{
listen 80;
server_name file.tools.claves.me;
location /seafhttp {
rewrite ^/seafhttp(.*)$ $1 break;
proxy_pass http://127.0.0.1:8082;
client_max_body_size 0;
proxy_connect_timeout 36000s;
proxy_read_timeout 36000s;
}
location / {
proxy_redirect off;
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_pass http://127.0.0.1:8000;
}
}
server
{
listen 80;
server_name filedown.tools.claves.me;
location /seafhttp {
rewrite ^/seafhttp(.*)$ $1 break;
proxy_pass http://127.0.0.1:8082;
client_max_body_size 0;
proxy_connect_timeout 36000s;
proxy_read_timeout 36000s;
}
}
Seafile Web配置如下:

-