WebDAV

De WikiMar
Dreceres ràpides: navegació, cerca

Informació de com configurar una carpeta amb acces per DAV (per exemple per calendaris .ical)

Servidor

Manual seguit: http://gentoo-wiki.com/HOWTO_WebDav


El fitxer /etc/apache2/vhosts.d/45_mod_dav.conf conté només:


<IfDefine DAV>
 <IfModule !mod_dav.c>
       LoadModule dav_module    modules/mod_dav.so
 </IfModule>
</IfDefine>
<IfDefine DAV_FS>
 <IfModule !mod_dav_fs.c>
       LoadModule dav_fs_module   modules/mod_dav_fs.so
 </IfModule>
</IfDefine>
<IfModule mod_dav_fs.c>
   # Location of the WebDAV lock database.
   DavLockDB /var/lib/dav/lockdb
</IfModule>




Part del Fitxer /etc/apache2/vhost_nomdomini.conf:


   <Directory /var/www/de.espai.de/htdocs/dav>
        Dav On
        Options None
        #Options Indexes FollowSymLinks
        AllowOverride None
        #Si la carpeta arrel usa RewriteEngine (per exemple per una Wiki) cal desactivar-lo:
        RewriteEngine Off

        Order allow,deny
        Allow from all
        #DavMinTimeout 600

        BrowserMatch "Dreamweaver-WebDAV*" redirect-carefully
        BrowserMatch "^WebDrive" redirect-carefully
        BrowserMatch "^WebDAVFS" redirect-carefully
        BrowserMatch "Microsoft-WebDAV-MiniRedir/5.1.2600" redirect-carefully
        BrowserMatch "Microsoft Data Access Internet Publishing Provider" redirect-carefully

        AuthType Basic
        AuthName "Restricted Repository"
        AuthUserFile /var/www/de.espai.de/.davpasswd

        <Limit GET HEAD OPTIONS PUT POST DELETE PROPFIND PROPPATCH MKCOL COPY MOVE LOCK UNLOCK>
                Require valid-user
                #Require user m
        </Limit>
        <LimitExcept GET HEAD OPTIONS>>
                Require user guest
        </LimitExcept>
  </Directory>



Es pot fer amb

<Location /dav>
...
</Location>

pero aleshores no es pot posar el AllowOverride None


Afegir comptes al fitxer de contrasenyes:

htpasswd2 -c /var/dav/.davpasswd myfirstdavuser
  The -c option will create the file, or empties the existing file if one exists.

Els altres usuaris:

htpasswd2 /var/dav/.davpasswd mydavuser




Versió antiga que va funcionar primer:

<Directory /var/www/de.espai.de/htdocs/dav>
       DAV On
       #AuthType Digest
       #AuthName "Bluehz's iDisk"
       #AuthDigestDomain idisk.domain_Name_here
       #AuthDigestFile /usr/local/apache/conf/users/domain_Name_here/.digest_pw
       AuthType Basic
       AuthName "Restricted Repository"
       AuthUserFile /var/www/de.espai.de/.davpasswd
       AllowOverride None
       Options None
       BrowserMatch "Dreamweaver-WebDAV*" redirect-carefully
       BrowserMatch "^WebDrive" redirect-carefully
       BrowserMatch "^WebDAVFS" redirect-carefully
       BrowserMatch "Microsoft-WebDAV-MiniRedir/5.1.2600" redirect-carefully
       BrowserMatch "Microsoft Data Access Internet Publishing Provider" redirect-carefully
       <Limit GET HEAD OPTIONS PUT POST DELETE PROPFIND PROPPATCH MKCOL COPY MOVE LOCK UNLOCK>
               #Require user bluehz
               Require valid-user
       </Limit>
       <LimitExcept GET HEAD OPTIONS>>
               Require user guest
       </LimitExcept>
</Directory>


The important part is that, in case that the folders cannot be deleted or renamed in WebDAV for Windows XP or Vista it is needed to add the following lines:

       BrowserMatch "Dreamweaver-WebDAV*" redirect-carefully
       BrowserMatch "^WebDrive" redirect-carefully
       BrowserMatch "^WebDAVFS" redirect-carefully
       BrowserMatch "Microsoft-WebDAV-MiniRedir/5.1.2600" redirect-carefully
       BrowserMatch "Microsoft Data Access Internet Publishing Provider" redirect-carefully

Aquest error ha estat corretgit gracies al post: http://marc.info/?l=dav-dev&m=108742481918786&w=2

I la part del DreamWeaver de: http://forums.macosxhints.com/showthread.php?t=22838



Client

Windows

Information backed up from http://smallvoid.com/article/winnt-webdav-network-drive.html

Windows XP includes the WebClient service that allows one to mount a Web Folder as a mapped network drive:

   net use x: "http://server.com/folder" /User:UserName Password

Note to make the mapping permanent add the parameter /persistent:yes

Note Windows XP can only connect to port 80 and can only map to a sub folder and not the root directly.

If wanting to make a secure SSL mapping using the https protocol at port 443:

   net use x: "\\server.com@ssl:443\folder" /User:UserName Password
   net use x: "https://server.com/folder" /User:UserName Password

Note Windows XP only supports SSL / https connections when using My Network Places, but can be tricked into using SSL with net use by creating a forward server using http://www.stunnel.org/ (stunnel) . More Info http://www.simple-groupware.de/cms/Main/WebDAV (Simple Groupware WebDAV).