Serve webdav behind nginx reverse ssl proxy

Hi all,

I am trying to configure rclone serve webdav behind nginx ssl reverse proxy but i encounter an issue with move / rename files/directories.
If i mount the webdav share directly from rclone (bypass nginx reverse proxy), there is no issue and i can create/delete/move/rename files and dirs.

But if i mount webdav share via nginx reverse ssl proxy, i cannot rename (or move) files and dirs. On nginx access log, i got 403 error.
On rclone daemon, i got error "file does not exist". I suspect short or simplified URLs from nginx to rclone, but i am not sure.

Here is the nginx config location (rclone serve webdav is running on 8080 port) :
location /rclone/ {
satisfy any;
allow 192.168.0.0/16;
deny all;
auth_basic 'Authentication';
proxy_pass http://XXXX:8080/;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real-IP $remote_addr;
}

Any idea ?
thx.

I think this is probably because you are serving at /rclone/ instead of /. Try serving it at / - does it work then?

Rclone will need a tweak to enable serving it at /rclone/.

Hi,

Perfect, it works !

Is there any option to allow /xxx instead of / when starting rclone serve webdav … ?

Thanks !

Not yet, though I think it is a reasonable request! Can you please make a new issue on github - thanks.

Hi,

thanks for your answer, it is done #3398 :slight_smile:

1 Like