Results 1 to 8 of 8

Thread: webdav vs apache2.2

  1. #1
    Join Date
    Jun 2008
    Location
    /earth/europe/uk/england/west-yorkshire/leeds/mystreet/myhouse
    Posts
    248

    Default 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

    Code:
    ./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

    Code:
    ./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
    Code:
    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!!)

  2. #2
    Join Date
    Jun 2008
    Location
    /earth/europe/uk/england/west-yorkshire/leeds/mystreet/myhouse
    Posts
    248

    Default Re: webdav vs apache2.2

    <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
    Code:
    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)

    Code:
    dav_props.c:1265: warning: assignment makes pointer from integer without a cast
    dav_props.c:1267: error: &#226;dav_propdb&#226; has no member named &#226;p&#226;
    dav_props.c:1281: error: &#226;dav_hooks_db&#226; has no member named &#226;freedatum&#226;
    dav_props.c:1281: error: &#226;dav_propdb&#226; has no member named &#226;db&#226;
    dav_props.c:1285: error: &#226;dav_propdb&#226; has no member named &#226;p&#226;
    dav_props.c:1295: error: &#226;dav_propdb&#226; has no member named &#226;p&#226;
    dav_props.c: In function &#226;dav_prop_validate&#226;:
    dav_props.c:1337: error: &#226;dav_propdb&#226; has no member named &#226;p&#226;
    dav_props.c:1339: warning: assignment makes pointer from integer without a cast
    dav_props.c:1346: error: &#226;dav_propdb&#226; has no member named &#226;resource&#226;
    dav_props.c:1361: error: &#226;dav_propdb&#226; has no member named &#226;deferred&#226;
    dav_props.c:1372: error: &#226;dav_propdb&#226; has no member named &#226;db&#226;
    dav_props.c:1373: error: &#226;dav_propdb&#226; has no member named &#226;p&#226;
    dav_props.c:1377: warning: assignment makes pointer from integer without a cast
    dav_props.c: In function &#226;dav_prop_exec&#226;:
    dav_props.c:1406: error: &#226;dav_propdb&#226; has no member named &#226;p&#226;
    dav_props.c:1406: warning: assignment makes pointer from integer without a cast
    dav_props.c:1410: error: &#226;dav_propdb&#226; has no member named &#226;resource&#226;
    dav_props.c:1423: error: &#226;dav_propdb&#226; has no member named &#226;db_hooks&#226;
    dav_props.c:1423: error: &#226;dav_propdb&#226; has no member named &#226;db&#226;
    dav_props.c:1434: error: &#226;dav_propdb&#226; has no member named &#226;p&#226;
    dav_props.c:1437: error: &#226;dav_propdb&#226; has no member named &#226;p&#226;
    dav_props.c:1438: error: &#226;dav_propdb&#226; has no member named &#226;ns_map&#226;
    dav_props.c:1441: error: &#226;dav_propdb&#226; has no member named &#226;db_hooks&#226;
    dav_props.c:1441: error: &#226;dav_propdb&#226; has no member named &#226;db&#226;
    dav_props.c:1456: error: &#226;dav_propdb&#226; has no member named &#226;db_hooks&#226;
    dav_props.c:1456: error: &#226;dav_propdb&#226; has no member named &#226;db&#226;
    dav_props.c:1467: error: &#226;dav_propdb&#226; has no member named &#226;p&#226;
    dav_props.c:1469: warning: assignment makes pointer from integer without a cast
    dav_props.c: In function &#226;dav_prop_commit&#226;:
    dav_props.c:1481: error: &#226;dav_propdb&#226; has no member named &#226;resource&#226;
    dav_props.c: In function &#226;dav_prop_rollback&#226;:
    dav_props.c:1503: error: &#226;dav_propdb&#226; has no member named &#226;resource&#226;
    dav_props.c:1511: error: &#226;dav_propdb&#226; has no member named &#226;db_hooks&#226;
    dav_props.c:1511: error: &#226;dav_propdb&#226; has no member named &#226;db&#226;
    dav_props.c:1515: error: &#226;dav_propdb&#226; has no member named &#226;db_hooks&#226;
    dav_props.c:1515: error: &#226;dav_propdb&#226; has no member named &#226;db&#226;
    make: *** [dav_props.o] Error 1
    naturally, 'make install' under root also fails with many errors (sample shown below).

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

    Any ideas anyone?



    *EDIT*
    FYI the content of the extracted httpd folder
    Code:
    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
    Last edited by badger_fruit; 27-Jun-2008 at 03:57. Reason: Additional info

  3. #3
    Join Date
    Jun 2008
    Location
    /earth/europe/uk/england/west-yorkshire/leeds/mystreet/myhouse
    Posts
    248

    Default Re: webdav vs apache2.2

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

  4. #4
    Join Date
    Jun 2008
    Location
    UTC+10
    Posts
    9,686
    Blog Entries
    4

    Default Re: webdav vs apache2.2

    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?

  5. #5

    Default Re: webdav vs apache2.2

    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:
    Code:
    DavLockDB /var/lib/apache2/dav/lockdb
    and in between <directory> </directory>
    Code:
    Dav on
    Create the directory /var/lib/apache2/dav and change the rights:
    Code:
    $> chown wwwrun /var/lib/apache2/dav
    $> chgrp www /var/lib/apache2/dav
    $> chmod 755 /var/lib/apache2/dav

  6. #6
    Join Date
    Jun 2008
    Location
    /earth/europe/uk/england/west-yorkshire/leeds/mystreet/myhouse
    Posts
    248

    Default Re: webdav vs apache2.2

    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
    Code:
    ./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

    Code:
    LoadModule dav_module /usr/local/apache2/include/mod_dav.h
    before the directory directive and also a a LockDB file
    Code:
    DavLockDB myDavLock
    Finally, added
    Code:
    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
    Code:
    /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
    Code:
    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

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

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

  7. #7
    Join Date
    Jun 2008
    Location
    /earth/europe/uk/england/west-yorkshire/leeds/mystreet/myhouse
    Posts
    248

    Default Re: webdav vs apache2.2

    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

  8. #8
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    10,949
    Blog Entries
    2

    Default Re: webdav vs apache2.2

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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •