# WebDAV 405 Method Not Allowed

## rossi123

Hi,

i posted this question in the german group. i am sorry about this double-posting, but i really need to get this work until wednesday.

i installed webdav, but it alway says "405 Method Not Allowed". i'd like to access to the "/efin"-directory. NOT depending on parameters given to cadaver it alway rejects the path. i also tried to add an useraccount (like https://user@localhost/efin").

 *Quote:*   

> /var/dav # cadaver https://localhost/efin
> 
> WARNING: Untrusted server certificate presented for `localhost':
> 
> Issued to: Test Certificate, Apache HTTP Server
> ...

 

(it is not relevant whether i use http or https exept for the untrusted certificate)

/etc/apache2/modules.d/45_mod_dav.conf:

(i also tried to unmark the remarks, but nothing changed)

```
Alias /efin /var/dav/mydavserver

<Directory /var/dav/mydavserver>

        Options None

        Dav On

#       AllowOverride None

#       Order allow,deny

#       Allow from all

        <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>

</Directory>

```

/etc/conf.d/apache2:

```
APACHE2_OPTS="-D DEFAULT_VHOST -D INFO -D LANGUAGE -D SSL -D SSL_DEFAULT_VHOST -D PHP5 -D DAV -D DAV_FS -D SVN -D SVN_AUTHZ"

```

Needed directories and the password-file (generated with htpassword2):

```
/var/dav # l

537546249 0 drwxr-xr-x  3 apache apache  100 Mar 30 21:42 .

671089061 4 drwxr-xr-x 15 root   root   4096 Mar 30 11:04 ..

537546251 4 -rw-r--r--  1 apache apache   20 Mar 30 19:49 .davpasswd

604259106 0 drwxrwxrwx  2 apache apache    6 Mar 30 11:04 mydavserver

```

/var/log/apache2/ssl_request_log:

```
[30/Mar/2008:22:04:01 +0000] 127.0.0.1 TLSv1 DHE-RSA-AES256-SHA "OPTIONS /efin/ HTTP/1.1" -

[30/Mar/2008:22:04:01 +0000] 127.0.0.1 TLSv1 DHE-RSA-AES256-SHA "PROPFIND /efin/ HTTP/1.1" 291
```

/var/log/apache2/sl_access_log:

```
127.0.0.1 - - [30/Mar/2008:22:04:01 +0000] "OPTIONS /efin/ HTTP/1.1" 200 -

127.0.0.1 - - [30/Mar/2008:22:04:01 +0000] "PROPFIND /efin/ HTTP/1.1" 405 291
```

/var/log/apache2/sl_error_log has no relevant entries

Thanks for your assistance in advance.

best regards

Markus

----------

## jquinte

Same problem here. Does anyone have any ideas?    :Sad: 

----------

## grumblebear

Did you really supply a valid username/password pair from /var/dav/.davpasswd?

Try to comment out the LIMIT directive.

----------

## jquinte

I found the error that caused this weird behaviour.

There was a line in the 45_mod_dav.conf file that said:

```
<IfModule auth_basic_module>
```

 and that module was not included in the APACHE2_MODULES line in /etc/make.conf.

I'm now trying to fine tune the security.

----------

## meow

After much trial and error, managed to get the webdav going with apache 2.2.8.

I have to use the location directive and I can't turn on authentication somehow and have to recreate 45_mod_dav.conf with just these:

DavLockDB /var/lib/dav/lockdb

Alias /upload "/home/intranet/calendar"

<Location /upload>

  DAV On

</Location>

Hope these help those who are having problem with "405 Method Not Allowed" error message.

----------

## jquinte

Hi, rossi123!

Do you have the proper authentication module loaded? Can you check that?

Because, as I wrote in my last post, that was exactly my problem.

What happen if you try commenting out the lines of the "Limit" block?

P.S.: Do not forget to put SOLVED in the title if you consider that the problem has been solved.

----------

