webdav vs apache2.2

ARGH!!!
I have been banging my head trying to get apache2.2 to work as/with webdav.

Although I am fairly new to linux, I am not a total noob lol so followed my nose and tried to get it working.

I discovered plenty of information on what webdav is and so on and a lovely website mod_dav Installation and Configuration which has apache install instructions. The problem is, I think these relate to Apache 1.3.x as when I run the command

./configure --with-apache=/usr/local/apache2

(which is where apache2 defaults its install to) I am told

checking for static Apache module support… no - Unable to locate /usr/local/apache2/src/include/httpd.h
checking for dynamic Apache module support (via APXS)… no
configure: error: You need to point --with-apache at the base Apache source code directory

and the installer quits.
I compiled apache2.2 from the source code (stored in /home/badger_fruit/httpd/) so tried

./configure --with-apache=/home/badger_fruit/httpd

but received the same error

checking for static Apache module support… no - Unable to locate /home/badger_fruit/httpd/src/include/httpd.h
checking for dynamic Apache module support (via APXS)… no
configure: error: You need to point --with-apache at the base Apache source code directory

i did a

find / -name httpd.h

as root and it found two entries:-

(1) /usr/local/apache2/include/httpd.h
(2) /home/badger_fruit/httpd/include/httpd.h

(1) is the one that Apache2.2 installs
(2) is the one I compiled from

Question: Is there a way of changing where the webdav installer (./configure) looks for these files?
I think if I can do this then it might just work (or at least move on to another error!!)

<UPDATE> So i messed around with the file CONFIGURE and replaced instances of “src/include” with just “include”, there were only 5 so I am fairly certain that this should have changed the path OK.

When i run
./configure --with-apache=/home/badger_fruit/httpd

All seems well


checking for gcc... gcc
checking for C compiler default output... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for executable suffix...
checking for object suffix... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for ranlib... ranlib
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for static Apache module support... mkdir: cannot create directory `/home/badger_fruit/httpd/src/modules/dav': No such file or directory
yes - Apache 1.3.x
checking for dynamic Apache module support (via APXS)... no
checking for expat... found in /usr
configure: creating ./config.status
config.status: creating Makefile
config.status: creating libdav.module
config.status: creating config.h
config.status: config.h is unchanged

the next step according to the webdav webpage (mod_dav Installation and Configuration) is to ‘make’ and ‘make install’

make fails with numerous errors (a sample of which are shown below)


dav_props.c:1265: warning: assignment makes pointer from integer without a cast
dav_props.c:1267: error: âdav_propdbâ has no member named âpâ
dav_props.c:1281: error: âdav_hooks_dbâ has no member named âfreedatumâ
dav_props.c:1281: error: âdav_propdbâ has no member named âdbâ
dav_props.c:1285: error: âdav_propdbâ has no member named âpâ
dav_props.c:1295: error: âdav_propdbâ has no member named âpâ
dav_props.c: In function âdav_prop_validateâ:
dav_props.c:1337: error: âdav_propdbâ has no member named âpâ
dav_props.c:1339: warning: assignment makes pointer from integer without a cast
dav_props.c:1346: error: âdav_propdbâ has no member named âresourceâ
dav_props.c:1361: error: âdav_propdbâ has no member named âdeferredâ
dav_props.c:1372: error: âdav_propdbâ has no member named âdbâ
dav_props.c:1373: error: âdav_propdbâ has no member named âpâ
dav_props.c:1377: warning: assignment makes pointer from integer without a cast
dav_props.c: In function âdav_prop_execâ:
dav_props.c:1406: error: âdav_propdbâ has no member named âpâ
dav_props.c:1406: warning: assignment makes pointer from integer without a cast
dav_props.c:1410: error: âdav_propdbâ has no member named âresourceâ
dav_props.c:1423: error: âdav_propdbâ has no member named âdb_hooksâ
dav_props.c:1423: error: âdav_propdbâ has no member named âdbâ
dav_props.c:1434: error: âdav_propdbâ has no member named âpâ
dav_props.c:1437: error: âdav_propdbâ has no member named âpâ
dav_props.c:1438: error: âdav_propdbâ has no member named âns_mapâ
dav_props.c:1441: error: âdav_propdbâ has no member named âdb_hooksâ
dav_props.c:1441: error: âdav_propdbâ has no member named âdbâ
dav_props.c:1456: error: âdav_propdbâ has no member named âdb_hooksâ
dav_props.c:1456: error: âdav_propdbâ has no member named âdbâ
dav_props.c:1467: error: âdav_propdbâ has no member named âpâ
dav_props.c:1469: warning: assignment makes pointer from integer without a cast
dav_props.c: In function âdav_prop_commitâ:
dav_props.c:1481: error: âdav_propdbâ has no member named âresourceâ
dav_props.c: In function âdav_prop_rollbackâ:
dav_props.c:1503: error: âdav_propdbâ has no member named âresourceâ
dav_props.c:1511: error: âdav_propdbâ has no member named âdb_hooksâ
dav_props.c:1511: error: âdav_propdbâ has no member named âdbâ
dav_props.c:1515: error: âdav_propdbâ has no member named âdb_hooksâ
dav_props.c:1515: error: âdav_propdbâ has no member named âdbâ
make: *** [dav_props.o] Error 1

naturally, ‘make install’ under root also fails with many errors (sample shown below).


dav_props.c:1265: warning: assignment makes pointer from integer without a cast
dav_props.c:1267: error: âdav_propdbâ has no member named âpâ
dav_props.c:1281: error: âdav_hooks_dbâ has no member named âfreedatumâ
dav_props.c:1281: error: âdav_propdbâ has no member named âdbâ
dav_props.c:1285: error: âdav_propdbâ has no member named âpâ
dav_props.c:1295: error: âdav_propdbâ has no member named âpâ
dav_props.c: In function âdav_prop_validateâ:
dav_props.c:1337: error: âdav_propdbâ has no member named âpâ
dav_props.c:1339: warning: assignment makes pointer from integer without a cast
dav_props.c:1346: error: âdav_propdbâ has no member named âresourceâ
dav_props.c:1361: error: âdav_propdbâ has no member named âdeferredâ
dav_props.c:1372: error: âdav_propdbâ has no member named âdbâ
dav_props.c:1373: error: âdav_propdbâ has no member named âpâ
dav_props.c:1377: warning: assignment makes pointer from integer without a cast
dav_props.c: In function âdav_prop_execâ:
dav_props.c:1406: error: âdav_propdbâ has no member named âpâ
dav_props.c:1406: warning: assignment makes pointer from integer without a cast
dav_props.c:1410: error: âdav_propdbâ has no member named âresourceâ
dav_props.c:1423: error: âdav_propdbâ has no member named âdb_hooksâ
dav_props.c:1423: error: âdav_propdbâ has no member named âdbâ
dav_props.c:1434: error: âdav_propdbâ has no member named âpâ
dav_props.c:1437: error: âdav_propdbâ has no member named âpâ
dav_props.c:1438: error: âdav_propdbâ has no member named âns_mapâ
dav_props.c:1441: error: âdav_propdbâ has no member named âdb_hooksâ
dav_props.c:1441: error: âdav_propdbâ has no member named âdbâ
dav_props.c:1456: error: âdav_propdbâ has no member named âdb_hooksâ
dav_props.c:1456: error: âdav_propdbâ has no member named âdbâ
dav_props.c:1467: error: âdav_propdbâ has no member named âpâ
dav_props.c:1469: warning: assignment makes pointer from integer without a cast
dav_props.c: In function âdav_prop_commitâ:
dav_props.c:1481: error: âdav_propdbâ has no member named âresourceâ
dav_props.c: In function âdav_prop_rollbackâ:
dav_props.c:1503: error: âdav_propdbâ has no member named âresourceâ
dav_props.c:1511: error: âdav_propdbâ has no member named âdb_hooksâ
dav_props.c:1511: error: âdav_propdbâ has no member named âdbâ
dav_props.c:1515: error: âdav_propdbâ has no member named âdb_hooksâ
dav_props.c:1515: error: âdav_propdbâ has no member named âdbâ
make: *** [dav_props.o] Error 1

Any ideas anyone?

EDIT
FYI the content of the extracted httpd folder


ls /home/badger_fruit/httpd/
ABOUT_APACHE      BuildAll.dsp   config.log     emacs-style  InstallBin.dsp  Makefile.win  NWGNUmakefile     srclib
acinclude.m4      BuildBin.dsp   config.nice    httpd        LAYOUT          modules       os                support
Apache.dsw        buildconf      config.status  httpd.dsp    libhttpd.dsp    modules.c     README            test
apachenw.mcp.zip  buildmark.o    configure      httpd.spec   LICENSE         modules.lo    README.platforms  VERSIONING
apache.txt        CHANGES        configure.in   include      Makefile        modules.o     ROADMAP
build             config.layout  docs           INSTALL      Makefile.in     NOTICE        server

Sorry for the additional ‘reply’ but it seems you’re limited to how long you can leave a post before you edit it again :\

Ok, so I was having a poke around in my httpd source code directory and noticed under the “modules” folder, a folder called “dav”; in there, three additional folders “fs”, “lock” and “main”.

I couldn’t find documented anywhere, but does apache2.2 come with webdav already and it’s just a case of re-compiling with “./configure --withdav” (or something similar)??

It looks like the DAV module has been included in Apache since 2.0

Overview of new features in Apache 2.0 - Apache HTTP Server

If you see either:

/usr/lib64/apache2/mod_dav.so
/usr/lib/apache2/mod_dav.so

then it’s already included and all you had to do was enable it in /etc/sysconfig/apache2.

Isn’t that a bummer? :wink:

Hi

As stated before it’s already compiled with dav support. Just add the modules “dav” and “dav_fs” in /etc/sysconfig/apache2 and as well depending on your needs add to /etc/apache2/httpd.conf:

DavLockDB /var/lib/apache2/dav/lockdb

and in between

Dav on

Create the directory /var/lib/apache2/dav and change the rights:

$> chown wwwrun /var/lib/apache2/dav
$> chgrp www /var/lib/apache2/dav
$> chmod 755 /var/lib/apache2/dav

lol, yeah, well i have been making some serious progress ove r the past hour or so since my last post!

I re-compiled and make/installed apache thusly

./configure --enable-dav

Which then included the webdav stuff needed, well, sort of(!). Running into no other problems, before I started the apache service, I went into httpd.conf and added

LoadModule dav_module /usr/local/apache2/include/mod_dav.h

before the directory directive and also a a LockDB file

DavLockDB myDavLock

Finally, added

Dav On

into a Directory directive.

The next step was to start the apache server, fingers crossed and a following wind, I promptly received an error message stating

/usr/local/apache2/bin/httpd: error while loading shared libraries: libexpat.so.0: cannot open shared object file: No such file or directory

Not to be beaten at this stage, I did a quick goooooooogle search and discovered I needed libexpat0 and libexpat1.

Firing up yast2 I installed them and tried once more.
This time, I was told by apache that

httpd: Syntax error on line 132 of /usr/local/apache2/conf/httpd.conf: module dav_module is built-in and can’t be loaded

Commented out my original

LoadModule dav_module /usr/local/apache2/include/mod_dav.h

and tried again, SUCCESS!!! Apache started with no errors or warnings, hoorah said I, I’d best update my post with my findings :wink:

So, my next step is to get sunbird installed and configured to use this server :wink:

So far, considering (under Windows) Sunbird version 0.8 doesn’t seem to work at all (example, selecting “Create New Calendar” does not prompt me to define a new calendar) and version 0.7 refuses to go beyond entering the name of a new calendar, this battle may go on for some time …

Oh, just a quick follow up question, can someone tell me how I can test that all this is actually working as webdav?

I browse to http://localhost and get the standard “it works!” message but no DAVLock file is created etc (which I would expect is because im not making any dav calls etc?)

Thanks once again

A commonly used function of WebDAV is to DragNDrop a file to a website directory (with proper permissions set) to upload a file.