# apache2 webdav [solved]

## andi_s

hello,

i have a problem to get webdav working.

i started with a working apache2 server with two virtualhosts

one running on port 80 and one running on 443 (ssl)

now i need another virtualhost on port 81 for webdav, so i cloned

the .conf of the default_vhost (on port 80), replaced the defined ports with port 81

and got another virtualhost running on port 81.

then i followed this tutorial: http://en.gentoo-wiki.com/wiki/WebDav and tried to get webdav running, but i am stuck - i am not able to connect to the server.

cadaver 127.0.0.1:81 always returns 403 forbidden

the DAV modules are enabled as described in the wiki

this is my dav_vhost.conf

```

Listen 81

NameVirtualHost *:81

<VirtualHost *:81>

   ServerName localhost

   <Directory "/var/dav/mydavserver">

   AllowOverride None

   Order allow,deny

   Allow from all

   </Directory>

   <IfModule mod_dav.c>

   Alias /mydavserver /var/dav/mydavserver

   DavMinTimeout 600

        <Location /mydavserver>

                Options None

                Dav On

                <Limit GET PUT POST DELETE PROPFIND PROPPATCH MKCOL COPY MOVE LOCK UNLOCK>

                        AuthType Basic

                        AuthName "WebDav Restricted Repository"

                        AuthUserFile /var/dav/.davpasswd

                        Require valid-user

                </Limit>

        </Location>

   </IfModule>

   <IfModule setenvif_module>

   BrowserMatch "Microsoft Data Access Internet Publishing Provider" redirect-carefully

   BrowserMatch "MS FrontPage" redirect-carefully

   BrowserMatch "^WebDrive" redirect-carefully

   BrowserMatch "^WebDAVFS/1.[012345678]" redirect-carefully

   BrowserMatch "^gnome-vfs/1.0" redirect-carefully

   BrowserMatch "^XML Spy" redirect-carefully

   BrowserMatch "^Dreamweaver-WebDAV-SCM1" redirect-carefully

   </IfModule>

   <IfDefine DAV>

   DavLockDB "/var/lib/dav/lockdb"

   </IfDefine>

</VirtualHost>

```

Last edited by andi_s on Thu Feb 04, 2010 8:35 am; edited 1 time in total

----------

## VinzC

You're lacking at least the DocumentRoot clause in your configuration file. Try adding it beforehand.

----------

## andi_s

thanks - this did it!

----------

