Hi
I got Seafile running in Docker and would like to activate Webdav.
I have other docker images running on the same server, so I am using them behind an Nginx proxy (natively installed on the Ubuntu 16.04 machine). I am trying to sort the docker installation via ports.
The “normal” Seafile installation works nice. This helped me setting it up:
The Nginx config is:
server {
listen 443 ssl http2;
listen [::]:443 http2 ssl;
server_name seafile.example.com;ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_certificate /etc/letsencrypt/live/seafile.example.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/seafile.example.com/privkey.pem;proxy_set_header X-Real-IP $remote_addr;
location / {
proxy_pass http://localhost:3100;
proxy_read_timeout 310s;
proxy_set_header Host $host;
proxy_set_header Forwarded “for=$remote_addr;proto=$scheme”;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Connection “”;
proxy_http_version 1.1;
}
}
Now I activated Webdav in seafdav.conf
[WEBDAV]
enabled = true
port = 8080
fastcgi = true
share_name = /webdav
In my Seafile docker start script, I exposed port 3180:8080.
Now I am not sure how to configure my Nginx-Proxy.
I tried two options: a proxy pass and the same fastcgi script as written in the seafile manual.
Both don’t work for on my server. 502: Bad Gateway error.
Would anyone have an idea what I am doing wrong? I know it’s not a real Seafile issue, more an Nginx issue. But any help would be appreciated. I will keep looking as well.
location /webdav {
proxy_pass http://localhost:3180;
proxy_read_timeout 310s;
proxy_set_header Host $host;
proxy_set_header Forwarded “for=$remote_addr;proto=$scheme”;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Connection “”;
proxy_http_version 1.1;
}
and I tried the same as in the Seafile manual:
location /webdav {
fastcgi_pass 127.0.0.1:3180;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_script_name;fastcgi_param SERVER_PROTOCOL $server_protocol; fastcgi_param QUERY_STRING $query_string; fastcgi_param REQUEST_METHOD $request_method; fastcgi_param CONTENT_TYPE $content_type; fastcgi_param CONTENT_LENGTH $content_length; fastcgi_param SERVER_ADDR $server_addr; fastcgi_param SERVER_PORT $server_port; fastcgi_param SERVER_NAME $server_name; fastcgi_param HTTPS on; fastcgi_param HTTP_SCHEME https; client_max_body_size 0; proxy_connect_timeout 36000s; proxy_read_timeout 36000s; proxy_send_timeout 36000s; send_timeout 36000s; # This option is only available for Nginx >= 1.8.0. See more details below. proxy_request_buffering off; access_log /var/log/nginx/seafdav.access.log; error_log /var/log/nginx/seafdav.error.log; }