Discussion:
problems with webdav and apache
Robin Paulson
2011-05-13 06:25:35 UTC
Permalink
hi all,
i'm setting up webdav on my apache installation to sync my zotero (a
citation/reference tool) database to my server. i have added the
following to '/etc/apache2/httpd.conf', created a user in the named
AuthUserFile called 'robin' and set a password, but when i try to
connect from zotero, it fails.

any suggestions gratefully accepted

===================================

LimitXMLRequestBody 10000000


<Location /var/www/zotero/>
Dav On

AuthType Basic
AuthName "WebDAV restricted"
AuthUserFile /var/local/http/dav/.DAVlogin

<LimitExcept GET HEAD OPTIONS>
Require user robin
</LimitExcept>
</Location>

===================================

as an aside, i feel like i should be restricting access to
'/var/www/zotero/' from the web browser (it's currently readable on the
web, albeit with nothing in it), but can't work out how the deny/allow
syntax functions in httpd.conf

cheers,

--
robin

http://bumblepuppy.org/blog/?p=237 - government bill to remove basic
human rights in NZ

_______________________________________________
NZLUG mailing list ***@linux.net.nz
http://www.linux.net.nz/cgi-bin/mailman/listinfo/nzlug
Cliff Pratt
2011-05-13 07:25:52 UTC
Permalink
On 13/05/11 18:25, Robin Paulson wrote:
> hi all,
> i'm setting up webdav on my apache installation to sync my zotero (a
> citation/reference tool) database to my server. i have added the
> following to '/etc/apache2/httpd.conf', created a user in the named
> AuthUserFile called 'robin' and set a password, but when i try to
> connect from zotero, it fails.
>
> any suggestions gratefully accepted
>
> ===================================
>
> LimitXMLRequestBody 10000000
>
>
> <Location /var/www/zotero/>
> Dav On
>
> AuthType Basic
> AuthName "WebDAV restricted"
> AuthUserFile /var/local/http/dav/.DAVlogin
>
> <LimitExcept GET HEAD OPTIONS>
> Require user robin
> </LimitExcept>
> </Location>
>
> ===================================
>
> as an aside, i feel like i should be restricting access to
> '/var/www/zotero/' from the web browser (it's currently readable on the
> web, albeit with nothing in it), but can't work out how the deny/allow
> syntax functions in httpd.conf
>
How did you set the password? It should be something like:

htpasswd /var/local/http/dav/.DAVlogin robin

If you want to reset the password file just add '-c' after the command.

But you probably did that!

Cheers,

Cliff

_______________________________________________
NZLUG mailing list ***@linux.net.nz
http://www.linux.net.nz/cgi-bin/mailman/listinfo/nzlug
Robin Paulson
2011-05-13 09:44:40 UTC
Permalink
On Fri, 13 May 2011 19:25:52 +1200, Cliff Pratt wrote:
> How did you set the password? It should be something like:
>
> htpasswd /var/local/http/dav/.DAVlogin robin
>
> If you want to reset the password file just add '-c' after the
> command.
>
> But you probably did that!

yes, that was exactly it

i checked from my zotero-enabled computer; the exact error message is:
"http://bumblepuppy.org/zotero/ is not a valid WebDAV URL."

so i wonder if i defined the address wrong, but it looks the same
format as the example .conf file in the online apache docs.

--
robin

http://bumblepuppy.org/blog/?p=237 - government bill to remove basic
human rights in NZ

_______________________________________________
NZLUG mailing list ***@linux.net.nz
http://www.linux.net.nz/cgi-bin/mailman/listinfo/nzlug
Cliff Pratt
2011-05-14 05:26:55 UTC
Permalink
On 13/05/11 21:44, Robin Paulson wrote:
> On Fri, 13 May 2011 19:25:52 +1200, Cliff Pratt wrote:
>> How did you set the password? It should be something like:
>>
>> htpasswd /var/local/http/dav/.DAVlogin robin
>>
>> If you want to reset the password file just add '-c' after the command.
>>
>> But you probably did that!
>
> yes, that was exactly it
>
> i checked from my zotero-enabled computer; the exact error message is:
> "http://bumblepuppy.org/zotero/ is not a valid WebDAV URL."
>
> so i wonder if i defined the address wrong, but it looks the same format
> as the example .conf file in the online apache docs.
>
Shouldn't that be https by preference?

Cheers,

Cliff

_______________________________________________
NZLUG mailing list ***@linux.net.nz
http://www.linux.net.nz/cgi-bin/mailman/listinfo/nzlug
Robin Paulson
2011-05-14 10:12:29 UTC
Permalink
On Sat, 14 May 2011 17:26:55 +1200, Cliff Pratt wrote:
>> yes, that was exactly it
>>
>> i checked from my zotero-enabled computer; the exact error message
>> is:
>> "http://bumblepuppy.org/zotero/ is not a valid WebDAV URL."
>>
>> so i wonder if i defined the address wrong, but it looks the same
>> format
>> as the example .conf file in the online apache docs.
>>
> Shouldn't that be https by preference?

i tried https as well, still no go

--
robin

http://bumblepuppy.org/blog/?p=237 - government bill to remove basic
human rights in NZ

_______________________________________________
NZLUG mailing list ***@linux.net.nz
http://www.linux.net.nz/cgi-bin/mailman/listinfo/nzlug
Robin Sheat
2011-05-13 20:13:31 UTC
Permalink
Op vrijdag 13 mei 2011 18:25:35 schreef Robin Paulson:
> but when i try to
> connect from zotero, it fails.

What happens when it fails? In particular, what's in the access and error
logs?

Robin.
Robin Paulson
2011-05-14 02:24:35 UTC
Permalink
On Sat, 14 May 2011 08:13:31 +1200, Robin Sheat wrote:
> What happens when it fails? In particular, what's in the access and
> error
> logs?

i'm not exactly sure what to look for - webdav is all rather new to me

so, i did:
$ cat error.log|grep -i zotero

and got nothing

$ cat access.log|grep -i zotero

gave this:
130.216.95.11 - - [11/May/2011:17:57:12 +1200] "OPTIONS /zotero/
HTTP/1.1" 200 - "-" "Mozilla/5.0 (X11; U; Linux i686; en-US;
rv:1.9.2.17) Gecko/20110422 Ubuntu/10.10 (maverick) Firefox/3.6.17"

a lot, which i think was from me accessing the page through the browser

$ cat other_vhosts_access.log|grep -i zotero
showed nothing

doing a cat|grep for dav produced nothing in either of those files

--
robin

http://bumblepuppy.org/blog/?p=237 - government bill to remove basic
human rights in NZ

_______________________________________________
NZLUG mailing list ***@linux.net.nz
http://www.linux.net.nz/cgi-bin/mailman/listinfo/nzlug
Zarek Jenkinson
2011-05-14 02:23:28 UTC
Permalink
Just to check the blatantly obvious:
Do you have a LoadModule mod_dav_fs directive?
Do you have a DavLockDB directive?



--
Zarek Jenkinson
(+64) 021 0226 2670
http://akiwiguy.tk
_______________________________________________
NZLUG mailing list ***@linux.net.nz
http://www.linux.net.nz/cgi-bin/mailman/listinfo/nzlug
Robin Paulson
2011-05-14 02:51:49 UTC
Permalink
On Sat, 14 May 2011 14:23:28 +1200, Zarek Jenkinson wrote:
> Just to check the blatantly obvious:
> Do you have a LoadModule mod_dav_fs directive?

i symlinked to /etc/apache2/mods-available/dav_fs.load from
/etc/apache2/mods-enabled/

similarly, for dav.load, dav_lock.load and dav_fs.conf

which i believe is sufficient (and preferred), although i may have got
things round my neck and conflated two concepts

> Do you have a DavLockDB directive?

yes, see my first post - it includes the contents of
/etc/apache2/httpd.conf

--
robin

http://bumblepuppy.org/blog/?p=237 - government bill to remove basic
human rights in NZ

_______________________________________________
NZLUG mailing list ***@linux.net.nz
http://www.linux.net.nz/cgi-bin/mailman/listinfo/nzlug
Cliff Pratt
2011-05-14 05:19:11 UTC
Permalink
On 14/05/11 14:51, Robin Paulson wrote:
> On Sat, 14 May 2011 14:23:28 +1200, Zarek Jenkinson wrote:
>> Just to check the blatantly obvious:
>> Do you have a LoadModule mod_dav_fs directive?
>
> i symlinked to /etc/apache2/mods-available/dav_fs.load from
> /etc/apache2/mods-enabled/
>
> similarly, for dav.load, dav_lock.load and dav_fs.conf
>
> which i believe is sufficient (and preferred), although i may have got
> things round my neck and conflated two concepts
>
You could try a2enmod (and its partner a2dismod), but all they do is
build the symlinks anyway, I believe.
>
>> Do you have a DavLockDB directive?
>
> yes, see my first post - it includes the contents of
> /etc/apache2/httpd.conf
>
Cheers,

Cliff


_______________________________________________
NZLUG mailing list ***@linux.net.nz
http://www.linux.net.nz/cgi-bin/mailman/listinfo/nzlug
Robin Paulson
2011-05-14 10:13:25 UTC
Permalink
On Sat, 14 May 2011 17:19:11 +1200, Cliff Pratt wrote:
> On 14/05/11 14:51, Robin Paulson wrote:
>> On Sat, 14 May 2011 14:23:28 +1200, Zarek Jenkinson wrote:
>>> Just to check the blatantly obvious:
>>> Do you have a LoadModule mod_dav_fs directive?
>>
>> i symlinked to /etc/apache2/mods-available/dav_fs.load from
>> /etc/apache2/mods-enabled/
>>
>> similarly, for dav.load, dav_lock.load and dav_fs.conf
>>
>> which i believe is sufficient (and preferred), although i may have
>> got
>> things round my neck and conflated two concepts
>>
> You could try a2enmod (and its partner a2dismod), but all they do is
> build the symlinks anyway, I believe.

what is a2enmod?

--
robin

http://bumblepuppy.org/blog/?p=237 - government bill to remove basic
human rights in NZ

_______________________________________________
NZLUG mailing list ***@linux.net.nz
http://www.linux.net.nz/cgi-bin/mailman/listinfo/nzlug
Nevyn
2011-05-14 19:16:03 UTC
Permalink
On 14 May 2011 22:13, Robin Paulson <***@bumblepuppy.org> wrote:
>
> what is a2enmod?
>
> --
> robin

It's a command for enabling mods for apache. Just another abstraction.
I believe it just chucks a symlink in mods-enabled.

Regards,
Nevyn
http://nevsramblings.blogspot.com/

_______________________________________________
NZLUG mailing list ***@linux.net.nz
http://www.linux.net.nz/cgi-bin/mailman/listinfo/nzlug
Cliff Pratt
2011-05-14 23:40:29 UTC
Permalink
On 15/05/11 07:16, Nevyn wrote:
> On 14 May 2011 22:13, Robin Paulson<***@bumblepuppy.org> wrote:
>>
>> what is a2enmod?
>
> It's a command for enabling mods for apache. Just another abstraction.
> I believe it just chucks a symlink in mods-enabled.
>
Yes, that is my understanding. Using it is good because it avoids the
possibility of typos.

Cheers,

Cliff

_______________________________________________
NZLUG mailing list ***@linux.net.nz
http://www.linux.net.nz/cgi-bin/mailman/listinfo/nzlug
Cliff Pratt
2011-05-14 23:39:00 UTC
Permalink
On 14/05/11 22:13, Robin Paulson wrote:
> On Sat, 14 May 2011 17:19:11 +1200, Cliff Pratt wrote:
>> On 14/05/11 14:51, Robin Paulson wrote:
>>> On Sat, 14 May 2011 14:23:28 +1200, Zarek Jenkinson wrote:
>>>> Just to check the blatantly obvious:
>>>> Do you have a LoadModule mod_dav_fs directive?
>>>
>>> i symlinked to /etc/apache2/mods-available/dav_fs.load from
>>> /etc/apache2/mods-enabled/
>>>
>>> similarly, for dav.load, dav_lock.load and dav_fs.conf
>>>
>>> which i believe is sufficient (and preferred), although i may have got
>>> things round my neck and conflated two concepts
>>>
>> You could try a2enmod (and its partner a2dismod), but all they do is
>> build the symlinks anyway, I believe.
>
> what is a2enmod?
>
A little script which I believe is included in the Apache2 package that
enables modules. Its twin disables modules. It may be distro specific
but I thought that it was part of the Apache2 tar ball. Anyway, all it
does so far as I know is builds/removes the symlinks for you.

Cheers,

Cliff

_______________________________________________
NZLUG mailing list ***@linux.net.nz
http://www.linux.net.nz/cgi-bin/mailman/listinfo/nzlug
Robin Sheat
2011-05-15 06:02:14 UTC
Permalink
Op zaterdag 14 mei 2011 14:24:35 schreef Robin Paulson:
> 130.216.95.11 - - [11/May/2011:17:57:12 +1200] "OPTIONS zotero
> HTTP/1.1" 200 - "-" "Mozilla/5.0 (X11; U; Linux i686; en-US;
> rv:1.9.2.17) Gecko/20110422 Ubuntu/10.10 (maverick) Firefox/3.6.17"
>
> a lot, which i think was from me accessing the page through the browser

Zotero is a firefox plugin, right? In which case it probably will be sharing
the UA from firefox. I'd do something like 'tail -f error.log access.log', hit
it only with zotero, and see if anything happens.

Actually, it's using OPTIONS, a browser will normally do GET. So this looks
like a real webdav request.

I'm not really up with DAV except as it applies to setting up subversion -
does apache have another DAV module? If not, it may be worth a shot using
subversion as your backend. (Bonus to this: free versioning.) I was under the
impression that it didn't, but it's been a while since I looked - it might
just be that it doesn't have another versioning backend.

Hope this gets you somewhere...

Robin.
Robin Paulson
2011-05-15 10:58:52 UTC
Permalink
On Sun, 15 May 2011 18:02:14 +1200, Robin Sheat wrote:
> Zotero is a firefox plugin, right? In which case it probably will be
> sharing

yep

> the UA from firefox. I'd do something like 'tail -f error.log
> access.log', hit
> it only with zotero, and see if anything happens.

122.57.59.156 - - [15/May/2011:22:55:08 +1200] "OPTIONS /zotero/
HTTP/1.1" 200 - "-" "Mozilla/5.0 (X11; U; Linux i686; en-US;
rv:1.9.2.17) Gecko/20110422 Ubuntu/10.10 (maverick) Firefox/3.6.17"

which says not a whole lot...

> Actually, it's using OPTIONS, a browser will normally do GET. So this
> looks
> like a real webdav request.
>
> I'm not really up with DAV except as it applies to setting up
> subversion -
> does apache have another DAV module? If not, it may be worth a shot
> using
> subversion as your backend. (Bonus to this: free versioning.) I was
> under the
> impression that it didn't, but it's been a while since I looked - it
> might
> just be that it doesn't have another versioning backend.

maybe for the future, versioning would be useful but not now

--
robin

http://bumblepuppy.org/blog/?p=237 - government bill to remove basic
human rights in NZ

_______________________________________________
NZLUG mailing list ***@linux.net.nz
http://www.linux.net.nz/cgi-bin/mailman/listinfo/nzlug
Robin Sheat
2011-05-15 12:17:04 UTC
Permalink
Op zondag 15 mei 2011 22:58:52 schreef Robin Paulson:
> maybe for the future, versioning would be useful but not now

Well, my point (that I didn't explain) was that using a subversion backend may
give you all you need for a real DAV backend, assuming that you don't have one
already. I have successfully used WebDAV clients against svn in the past.

Keeping in mind that I know little about Apache's DAV support beyond this, so
perhaps use a grain of salt :)

Robin.
Continue reading on narkive:
Loading...