feat: webdav add docker

This commit is contained in:
Junxiang Huang 2024-10-31 10:06:08 +08:00
parent 659a1aa03b
commit eddc99cefa

View File

@ -35,7 +35,7 @@ Every time the configuration is modified, you need to restart seafile server to
```
Your WebDAV client would visit the Seafile WebDAV server at `http://example.com:8080/seafdav`
Your WebDAV client would visit the Seafile WebDAV server at `http{s}://example.com/seafdav`
In Pro edition 7.1.8 version and community edition 7.1.5, an option is added to append library ID to the library name returned by SeafDAV.
@ -47,47 +47,63 @@ show_repo_id=true
## Proxy
=== "Nginx"
For Seafdav, the configuration of Nginx is as follows:
=== "Deploy in Docker"
Modify `seafile-server.yml`
```yml
services:
...
seafile:
...
labels:
caddy: ${SEAFILE_SERVER_PROTOCOL:-http}://${SEAFILE_SERVER_HOSTNAME:?Variable is not set or empty}
caddy.0_reverse_proxy: "{{upstreams 80}}"
caddy.1_handle_path: /seafdav/*
caddy.1_handle_path.0_rewrite: "* /seafdav{uri}"
caddy.1_handle_path.1_reverse_proxy: "{{upstreams 8080}}"
...
```
.....
=== "Deploy from binary packages"
=== "Nginx"
location /seafdav {
rewrite ^/seafdav$ /seafdav/ permanent;
}
For Seafdav, the configuration of Nginx is as follows:
location /seafdav/ {
proxy_pass http://127.0.0.1:8080/seafdav/;
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 X-Forwarded-Host $server_name;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_read_timeout 1200s;
client_max_body_size 0;

access_log /var/log/nginx/seafdav.access.log seafileformat;
error_log /var/log/nginx/seafdav.error.log;
}
```
.....
location /:dir_browser {
proxy_pass http://127.0.0.1:8080/:dir_browser;
}
```
location /seafdav {
rewrite ^/seafdav$ /seafdav/ permanent;
}
=== "Apache"
location /seafdav/ {
proxy_pass http://127.0.0.1:8080/seafdav/;
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 X-Forwarded-Host $server_name;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_read_timeout 1200s;
client_max_body_size 0;

access_log /var/log/nginx/seafdav.access.log seafileformat;
error_log /var/log/nginx/seafdav.error.log;
}
For Seafdav, the configuration of Apache is as follows:
location /:dir_browser {
proxy_pass http://127.0.0.1:8080/:dir_browser;
}
```
```
......
<Location /seafdav>
ProxyPass "http://127.0.0.1:8080/seafdav"
</Location>
=== "Apache"
```
For Seafdav, the configuration of Apache is as follows:
```
......
<Location /seafdav>
ProxyPass "http://127.0.0.1:8080/seafdav"
</Location>
```
## Notes on Clients