# Apache 2.2.6-r5 broke webdav...and mod_cband :X

## justinCOD

So I upgraded to 2.2.6-r5 on Dec. 24th, from apache 2.2.6 (why all these changes...in a -rX release?? wtf!?)

...I noticed that my webdav and apparently mod_cband broke at that same time (by going back and looking through logs).

I will talk mostly about webdav, since I haven't even gotten around to the cband problems yet :/ I have gone through the howto on upgrading apache (http://www.gentoo.org/doc/en/apache-upgrading.xml) and switched to the new way of loading modules (sticking things in make.conf instead of apache_builtin_modules). 

Verified DAV is getting loaded:

```
Fri Jan 04 00:41:54 2008] [notice] Apache/2.2.6 (Unix) DAV/2 mod_ssl/2.2.6 OpenSSL/0.9.8g PHP/5.2.5-pl1-gentoo configured -- resuming normal operations
```

Actually, I went back through and blew away apache completely, removed all the config files, re-emerged apache, and imported all my vhosts and webserver configurations into all the *new* config files (why does this crap always change??!?). After fixing and correcting all the stupid vhost/ssl problems to get my sites working, I got back to working on webdav. It is still not working..I have spent hours trying to fix this and I am frustrated to all hell (have you noticed yet? :p)

Apache does not seem to even read my 45_mod_dav.conf when I make changes to it (or atleast some parts of it?). I am currently getting "client denied by server configuration" errors as if it said deny to all in my dav.conf file (which it doesn't). For testing, I commented the deny to all section of the "Directory /" directive in the file 00_default_settings.conf. I then had partial webdav working, I could pull a file off of it using a web browser with http://mysite.com/dav/file.txt, but webdav clients puked saying access denied. Example log excerpt when trying to login using Nautilus:

```
[Fri Jan 04 01:17:53 2008] [error] [client xxxxxxxxx] Directory index forbidden by Options directive: /path/to/dav/
```

Again that error tells me it's using default config from the "Directory /" directive and not what's in my dav.conf file...

So, 1 question, why is apache not reading in my config from 45_mod_dav.conf that says to allow from all??? I have -D DAV in my apache2 file in /etc/conf.d...same as I did before the upgrade when things worked perfectly for the longest time!@!!!

Why am I not getting prompted for user/passwd when using Nautilus or Mac finder when connecting to the webdav address?? My client just gets denied access and never asked to login...sigh. I mean, I know why a client gets denied access and I know how to fix it...but the config is correct in my dav.conf file and apache is not honoring it, or I am doing something stupid (also likely considering how long I've banged my head at this).

Here is the relevant section of my 45_mod_dav.conf:

```

Alias /dav "/path/to/dav"

<Directory "/path/to/dav">

        Dav On

        AuthType Digest

        AuthName DAV

        # You can use the htdigest program to create the password database:

        #   htdigest -c "/var/www/.htpasswd-dav" DAV-upload admin

        AuthUserFile "/path/to/.passwdfile"

        # Allow access from any host

        Order allow,deny

        Allow from all

        # Allow universal read-access, but writes are restricted

        # to the admin user.

        <LimitExcept GET OPTIONS>

                require user myuser

        </LimitExcept>

</Directory>

```

Mod_cband is throwing errors as if apache is not reading it's modules.d config file either. An error saying some of the CBand options are invalid suggesting the module is not loaded..ugh! (-D CBAND in APACHE2_OPTS WTF!?)

What am I missing that changed from 2.2.6 to make this stuff not work right?? 

Sorry for the rant, but I can't stand when stuff like this breaks that used to work perfectly fine.

Thanks for any help.

Justin

----------

## justinCOD

Anyone?? I have gone through this all over again today after regaining (only a tad) some sanity. Dav and cband are still broke as f*ck and I am getting seriously pissed off at this. I even unmasked and upgraded to 2.2.6-r6, which apparently is the real version where the new USE flags and make.conf settings are available, NOT in 2.2.6-r4 like the stupid doc says.

It appears that Apache is not even parsing my dav and cband config files as if the modules were never loaded...dav shows up in my make.conf, and my /etc/conf.d/apache2 is telling apache to use them:

```

APACHE2_MODULES="actions alias auth_basic auth_digest authn_anon authn_dbd authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info log_config logio mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_http rewrite setenvif so speling status unique_id userdir usertrack vhost_alias"
```

```
APACHE2_OPTS="-D DEFAULT_VHOST -D LANGUAGE -D SSL -D SSL_DEFAULT_VHOST -D CBAND -D USERDIR -D PHP5 -D DAV"

```

Oddly enough my php5 seems to work fine. Dav even shows up in the error_log during startup, same as I noted in original post. When I try apache2 -M I get:

```
justin@host vhosts.d $ apache2 -M

Syntax error on line 1 of /etc/apache2/vhosts.d/10_extra_vhosts.conf:

Invalid command '<CBandClass', perhaps misspelled or defined by a module not included in the server configuration

```

If I take out the Cband stuff in my vhosts config apache -M lists my modules but Dav does not show up?? WHY??!?

```
Loaded Modules:

 core_module (static)

 mpm_worker_module (static)

 http_module (static)

 so_module (static)

 actions_module (shared)

 alias_module (shared)

 auth_basic_module (shared)

 authn_anon_module (shared)

 authn_dbd_module (shared)

 authn_dbm_module (shared)

 authn_default_module (shared)

 authn_file_module (shared)

 authz_dbm_module (shared)

 authz_default_module (shared)

 authz_groupfile_module (shared)

 authz_host_module (shared)

 authz_owner_module (shared)

 authz_user_module (shared)

 autoindex_module (shared)

 cgid_module (shared)

 dbd_module (shared)

 deflate_module (shared)

 dir_module (shared)

 env_module (shared)

 expires_module (shared)

 ext_filter_module (shared)

 filter_module (shared)

 headers_module (shared)

 ident_module (shared)

 imagemap_module (shared)

 include_module (shared)

 log_config_module (shared)

 logio_module (shared)

 mime_module (shared)

 mime_magic_module (shared)

 negotiation_module (shared)

 rewrite_module (shared)

 setenvif_module (shared)

 speling_module (shared)

 unique_id_module (shared)

 usertrack_module (shared)

 vhost_alias_module (shared)

Syntax OK

```

I have recompiled everything, apache, cband, php, since updating the make.conf and switching to the new apache USE flags. I don't understand how this could break so bad, or that so many changes were made that screwed this all up. It was working fine a week and half ago under apache 2.2.6.

----------

## Suicidal

Definitely looks broken, even if I set the apache opts in make.conf and emerge -pv apache they don't seem to take affect.

JustinCOD, did you check the config files in /etc/apache/modules.d to see if the IfDefine for DAV changed?

----------

## butchie

Webdav broken here too. Putting >=www-servers/apache-2.2.6-r6 in package.mask and downgrading to 2.2.6-r5 didn't solve it.

----------

## butchie

Should I downgrade to www-servers/apache-2.0.59-r5 ? There are no 2.2 versions in between in portage.

----------

## WildCoder

I had the same kind of problem until I changed the authentication directives like this:

```

              AuthName "Incoming WebDAV Restricted Area"

              AuthType Digest

              AuthDigestDomain /Incoming/

              AuthDigestProvider file

              AuthUserFile /path/to/davusers

              AuthGroupFile /path/to/davgroups

              Require group incoming

```

Also make sure that you add -D AUTH_DIGEST in /etc/conf/apache if you use the Digest authentication like I do.

AuthDigestProvider file was the new key that solved my webdav problem.

Good luck!

-WildCoder

----------

## butchie

 *Quote:*   

> Also make sure that you add -D AUTH_DIGEST in /etc/conf/apache if you use the Digest authentication like I do. 

 

This did the trick  :Wink: 

10 persons are back to work, abled to access our webdav folder !

Thanks

----------

## mdr13

 *Quote:*   

> AuthDigestProvider file was the new key that solved my webdav problem. 

 

This solved the problem for me. Thank you, WildCoder!

----------

