[SOLVED] Re: Baikal caldav and documentroot

Da Rock freebsd-questions at herveybayaustralia.com.au
Sun Mar 22 23:32:46 UTC 2015


On 03/19/15 11:29, Da Rock wrote:
> Just a quick one: is anyone using Baikal for caldav? Is there a reason 
> it _must_ be documentroot?
>
> I haven't been successful in finding out the why - no docs either. Bit 
> of a pain in the butt with my current setup, but if I _must_ then I 
> guess I'll have to figure out how to adjust.
Well I figured it out, and I thought I'd let those interested ( :) ) 
know what the solution is to this one.

There are practically no docs to this webapp, so I thought I'd check out 
the rewrite rules in apache (of which I haven't had anything to do with 
as yet) to see if that might make it work for me. There is a rewrite 
rule already referencing .well-known/caldav|carddav, and looking at this 
I decided to run a search to see what might be happening.

Apparently this an rfc expectation for easy implementation by clients - 
although I have yet to find a client that does use it!

So, while it is best practice for this to be documentroot - namely this 
particular rfc requirement, the rewrite rule is supposed to take care of 
this. An adjustment to this will allow the sysadmin to allocate baikal 
to a subfolder.

This will allow access to baikal, but it still won't allow it to be used 
as a caldav - yet. To get this working fully, you need to go into system 
settings in baikal admin and change the variables for the _web path_ 
only. Keep in mind this is for the port install only, it may be 
different for a manual install.

To summarise, this is what you need to do to make baikal work as a 
subfolder of another vhost (not necessarily documentroot):

1. Adjust the rewrite rule in your apache setup to reflect the <new 
home> you want your caldav in:

RewriteEngine On
RewriteRule /.well-known/carddav <new home>/card.php [R,L]
RewriteRule /.well-known/caldav <new home>/cal.php [R,L]

2. Navigate to the baikal admin page and go to system settings and 
adjust the top 2 variables that relate to the absolute web path _only_. 
Do not touch the server path settings!

PROJECT_BASEURI . "<new home>/cal.php/"
PROJECT_BASEURI . "<new home>/card.php/"

3. Test!

Mat, perhaps this will be a good note in the port install message as 
well, as its not up to the port maintainer to take care of documentation 
of an application itself. Either that or maybe a readme somewhere in 
either share/ or the baikal/ directory. A note that this is at the 
sysadmins own risk might be in order too :)

Having said that, it would be good if all projects did at least some 
basic documentation for the apps created!

HTH


More information about the freebsd-questions mailing list