Tzafrir Cohen dijo [Wed, Nov 04, 2009 at 09:11:42AM +0000]:
> On Wed, Nov 04, 2009 at 08:49:54AM +0100, Stefano Zacchiroli wrote:
> > On Wed, Nov 04, 2009 at 08:08:46AM +0100, sean finney wrote:
> > > > We have webservers other than Apache.
> >
> > When raising this kind of counter argument, is usually nice to also
> > provide (pointers to) solutions :-)
>
> "For apache2: ....
>
> <inset here some other httpd-specific notes>
>
> Alternatively, just use the following command to make the package work
> with any httpd:
>
> ln -s /var/www/FOO ../../usr/share/foo
> "
In fact, as the Cherokee package maintainer, I put the base webserver
root at /usr/share/cherokee/default-site/index.html, and include this
in my postinst:
case "$1" in
configure)
# If there is no index.html, link ours to /var/www
if [ ! -e /var/www/index.html -a \
! -e /var/www/index.cgi -a \
! -e /var/www/index.pl -a \
! -e /var/www/index.php -a \
! -e /var/www/index.xhtml -a \
! -e /var/www/index.htm ] ; then
ln -s /usr/share/cherokee/default-site/index.html \
/var/www/index.html
if [ ! -e /var/www/cherokee-images ] ; then
# Of course, without the images, our page will be
# quite ugly. But it would be worse to clobber
# something!
ln -s /usr/share/cherokee/default-site/cherokee-images \
/var/www/cherokee-images
fi
fi
So, given the attention to this thread: Do you judge this as
policy-compliant? Of course, I could ship Cherokee defaulting its
document root to /usr/share/cherokee/default-site/, but it does feel
quite awkward. I have been silently following this thread, and of
course, intend on following policy as consensus is reached.
> (...)
> I looked at nginx, lighttpd and cherokee. IIRC aolserver4 and caudium
> are also configurable enough.
> (...)
> cherokee
> --------
> Likewise here the package does not seem to have an include directory.
> Thus I can't simply provide a sample configuration snippet for the user
> to copy.
>
> Furthermore, the rules used in the configuration seem to mee a bit too
> different. It would require a bit testing to even understand them. So
> for the hypothetical package foo I just don't bother.
>
> See http://www.cherokee-project.com/doc/dev_cherokee.conf.html
>
> I would tend to add sample apache configuration, test it, and have the
> package Suggest apache in addition to Depend-ing on httpd or httpd-cgi.
> This way I know I have something I tested to work. As close as possible
> with the "Just Works" factor to the simple symlink.
The Cherokee configuration file, although is hand-editable, is meant
to be managed by cherokee-admin. Anyway, a similar snippet would be:
vserver!1!rule!2!match = directory
vserver!1!rule!2!match!directory = /foo
vserver!1!rule!2!handler = file
vserver!1!rule!2!document_root = /usr/share/foo
But of course, this would require it to be the second rule on the
first vserver — This would be in any case ideally managed by a
command-line utility (which as of right now does not exist ;-) )
Of course... I highly value Debian's ability to have just-installed
package in a state that just-works. We do have /usr/lib/cgi-bin, which
achieves this goal - And I support the idea of having a
/var/lib/www-root or something along those lines to serve as a
canonical document root if the user does not specify otherwise.
Greetings,
--
Gunnar Wolf • gwolf@gwolf.org • (+52-55)5623-0154 / 1451-2244
Attachment:
signature.asc
Description: Digital signature