Seafile over nginx (https) and webdav

1,696 views
Skip to first unread message

Veron leets

unread,
Feb 20, 2014, 5:09:46 PM2/20/14
to sea...@googlegroups.com
Hello, 
something seems to be wrong with my nginx config or something else. Anyways I can't login. How am I supposed tp login? The URL is mydyndns.com/seafdav , right?

Here's my nginx conf:

server {
        listen       80;
        server_name  mydyndny.com;
        rewrite ^/(.*) https://$server_name/$1 permanent; # force redirect http to https
    }
server {
        listen 443;
        ssl on;
        ssl_certificate /home/seafile/seafile/seafile/cert/cacert.pem;            # path to your cacert.pem
        ssl_certificate_key /home/seafile/seafile/seafile/cert/privkey.pem; # path to your privkey.pem
        server_name mydyndns.com;    
        location / {
            fastcgi_pass    127.0.0.1:8000;
            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;
     
            access_log      /var/log/nginx/seahub.access.log;
       error_log       /var/log/nginx/seahub.error.log;
        }
 
location /seafhttp {
        rewrite ^/seafhttp(.*)$ $1 break;
        proxy_pass http://127.0.0.1:8082;
        client_max_body_size 0;
    }

    location /media {
        root /home/seafile/seafile/seafile/seafile-server-2.1.3/seahub;
    }

 location /webdav {
        fastcgi_pass    127.0.0.1:8080;
        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;

        access_log      /var/log/nginx/seafdav.access.log;
        error_log       /var/log/nginx/seafdav.error.log;
    }   
}

Any Idea?  

Thanks and best regards
Veron

Janek T.

unread,
Feb 20, 2014, 8:24:34 PM2/20/14
to sea...@googlegroups.com
Hello,

according to your configuration the URL is mydyndns.com/webdav

Probably you want to change the line "location /webdav" to "location /seafdav" as it's explained in the wiki. See https://github.com/haiwen/seafile/wiki/Seafile-WebDAV-Server#wiki-Sample_Configuration_2_With_nginxapache for details.


If you want webdav access on "/webdav" make sure that "share_name" in your seafdav.conf is set to "/webdav" too.

Best regards,
Janek

Veron leets

unread,
Feb 21, 2014, 3:35:39 AM2/21/14
to sea...@googlegroups.com
I tried that and it didn't work (changed the share_name, too).

I did everything according to the guide on github, but it seems that I'm missing something... Is the location /webdav in the right place on the config? 

Veron leets

unread,
Feb 21, 2014, 3:39:57 AM2/21/14
to sea...@googlegroups.com
Ok, it seems to work now. I forgot to add the https:// on the beginning. I have access to webDAV but there are no libriarys ...is this normal?

Veron leets

unread,
Feb 21, 2014, 3:47:22 AM2/21/14
to sea...@googlegroups.com
The Client I' using (Documents by reedle) lets me access webDAV but I get error when try to add files or create a folder:

When I try to upload a file it says "Upload failed: The operation couldn't be completed. (RDHTTPResponseCodeErrorDomain error 403).


Am Donnerstag, 20. Februar 2014 23:09:46 UTC+1 schrieb Veron leets:

Shuai Lin

unread,
Feb 21, 2014, 9:13:25 AM2/21/14
to sea...@googlegroups.com
The root folder is your libraries list, so it's read only. 


--
You received this message because you are subscribed to the Google Groups "seafile" group.
To unsubscribe from this group and stop receiving emails from it, send an email to seafile+u...@googlegroups.com.
To post to this group, send email to sea...@googlegroups.com.
Visit this group at http://groups.google.com/group/seafile.
For more options, visit https://groups.google.com/groups/opt_out.

Veron leets

unread,
Feb 22, 2014, 8:16:36 AM2/22/14
to sea...@googlegroups.com
Thanks for the answer. Its not clear to me what I have to change. Could you please explain?
Message has been deleted

Veron leets

unread,
Feb 27, 2014, 6:37:53 AM2/27/14
to sea...@googlegroups.com
Does nobody has an answer for me ? Please help... Which and where do I have to change permission?

Is it possible to have access to my librarys ?

Lingtao Pan

unread,
Feb 27, 2014, 8:53:45 PM2/27/14
to sea...@googlegroups.com
Hi, please try our latest version v2.1.5 first. We have improved webdav extension in this version.

Veron leets

unread,
Mar 6, 2014, 2:27:18 AM3/6/14
to sea...@googlegroups.com
Hallo Lingtao,

I did the update but nothing changed. I still can't upload files and I don't know where I have to change permissions ....

I would also like to know, if there is a possibility to access my seafile librarys over webdav?

Regards
Veron

Lingtao Pan

unread,
Mar 6, 2014, 9:53:22 AM3/6/14
to sea...@googlegroups.com
Hi Veron,

I read the emails carefully. You should first create some libraries via the web interface using your account. Then the libraries will be listed in your "Documents". Click into a library, you can create folders/files. I use "Documents" on my iPad too.

Veron leets

unread,
Mar 7, 2014, 4:00:46 AM3/7/14
to sea...@googlegroups.com
I already have librarys in Seafile which are full funktioning with the seafile desktop clients and the iOS Apps. Everything works, but webdav doesn't. I can connect to the server via a webdav client but I dont't see any of my librarys and I alway get error, when I'm trying to create a folder or save a document there...

I'm really confused, since there is nothing on the wiki that I didn't do... 

I mean I can connect, but it seem that I forgot to configure something.... I just can't find what went wrong!

Do I have to set permissions somehwere?

Lingtao Pan

unread,
Mar 7, 2014, 4:12:39 AM3/7/14
to sea...@googlegroups.com
What's in your "conf/seafdav.conf"?

JiaQiang Xu

unread,
Mar 7, 2014, 8:36:14 AM3/7/14
to sea...@googlegroups.com
Please have a look at logs/seafdav.log. Is there any error in that log file?

Veron leets

unread,
Mar 7, 2014, 9:33:29 AM3/7/14
to sea...@googlegroups.com
My seafdav.conf:

[WEBDAV]
enabled = true
port = 8080
fastcgi = true
share_name = /webdav

Which error log do you need? Nginx, Seafile or just tell me the name of the logfile..
Reply all
Reply to author
Forward
0 new messages