From owner-freebsd-ports@FreeBSD.ORG Sun Mar 22 23:32:46 2015 Return-Path: Delivered-To: ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4B16E869; Sun, 22 Mar 2015 23:32:46 +0000 (UTC) Received: from mail.unitedinsong.com.au (mail.unitedinsong.com.au [150.101.178.33]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EFAA9858; Sun, 22 Mar 2015 23:32:45 +0000 (UTC) Received: from laptop2.herveybayaustralia.com.au (laptop2.herveybayaustralia.com.au [192.168.0.185]) (using TLSv1 with cipher ECDHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by mail.unitedinsong.com.au (Postfix) with ESMTPSA id 33FD761F9D; Mon, 23 Mar 2015 09:32:33 +1000 (EST) Message-ID: <550F510F.70201@herveybayaustralia.com.au> Date: Mon, 23 Mar 2015 09:32:31 +1000 From: Da Rock User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:24.0) Gecko/20100101 Thunderbird/24.3.0 MIME-Version: 1.0 To: freebsd-questions@freebsd.org, mat@FreeBSD.org Subject: [SOLVED] Re: Baikal caldav and documentroot References: <550A2673.7070704@herveybayaustralia.com.au> In-Reply-To: <550A2673.7070704@herveybayaustralia.com.au> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: ports@freebsd.org X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Mar 2015 23:32:46 -0000 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 you want your caldav in: RewriteEngine On RewriteRule /.well-known/carddav /card.php [R,L] RewriteRule /.well-known/caldav /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 . "/cal.php/" PROJECT_BASEURI . "/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