# webDAV server using nginx module

**URL:** https://forum.yunohost.org/t/webdav-server-using-nginx-module/12554
**Category:** Advanced use case
**Tags:** english
**Created:** [September 1, 2020, 9:59pm UTC](https://forum.yunohost.org/t/webdav-server-using-nginx-module/12554 "2020-09-01T21:59:09Z")
**Posts on this page:** 1
**Showing post:** 5

<div class="post-metadata">

### Author: ![marc](https://forum.yunohost.org/user_avatar/forum.yunohost.org/marc/32/10973_2.png) [@marc](https://forum.yunohost.org/u/marc)
#### Post date: [October 22, 2022, 4:11pm UTC](https://forum.yunohost.org/t/webdav-server-using-nginx-module/12554/5 "2022-10-22T16:11:36Z")

</div>

Hi,  
I managed to create a Webdav server thanks to your discussion and to the [nginx webdav documentation](https://nginx.org/en/docs/http/ngx_http_dav_module.html)

1. I created a file named webdav.conf in /etc/nginx/conf.d/mon-domain.tld.d

```auto
rewrite ^/webdav$ /webdav/ permanent;
location /webdav/ {

    root /var/www;

    client_body_temp_path /var/www/webdav_client_temp;

    dav_methods PUT DELETE MKCOL COPY MOVE;

    create_full_put_path on;
    dav_access group:rw all:r;

  # Include SSOWAT user panel.
  include conf.d/yunohost_panel.conf.inc;
}

```

1. Then i created directories mentionned in this webavconf,

```auto
mkdir /var/www/webdav
mkdir /var/www/webdav_client_temp
chmod 777 /var/www/webdav
chmod 777 /var/www/webdav_client_temp

```

Of course, these chmod are not satisfying, they should be restricted to yunohost users

1. Then i edited the ssowat config to allow the connexion  
it is in /etc/ssowat/conf.json

in `"permissions":`, i added

```auto

        "webdav.main": {
            "auth_header": true,
            "label": "Webdav",
            "public": true,
            "show_tile": true,
            "uris": [
                "mon-domain.tld/webdav"
            ],
            "users": [
                "utilisateur1",
                "uilisateur2" (etc)
            ]
        }

```

I restarted the nginx service  
It works

I hope this can help

Maybe it would be convenient to transform this in a full Yunohost application.  
Can somebody help?

---

_[View the full topic](https://forum.yunohost.org/t/webdav-server-using-nginx-module/12554)._
