On Thu, Nov 05, 2009 at 09:00:12AM +0100, Stefano Zacchiroli wrote:
> On Wed, Nov 04, 2009 at 09:48:25PM +0100, Jan Hauke Rahm wrote:
> > self-registering of web servers webapps-common could solve this all. A
> > package build-depends on it and gets provided with necessary
> > post{inst,rm} lines to register with known web servers. Considering that
> > there are that many web servers in the archive, it should be managable
> > for webapps-common maintainers to keep up2date with those.
>
> No, not really. With webservers registering themselves I was thinking at
> something like each maintainer of a webserver package providing a script
> (which a specified API which is the same for all webservers). That
> script will be in charge of mapping one generic Alias directive (coming
> from a single webapp package) to the way of implementing that directive
> in the specific webserver. This way the webapps-common infrastructure is
> no longer in charge of maintaining neither the knowledge nor the
> implementation of every single webserver, it is only in charge of
> maintaining the generic infrastructure.
Okay, I understand. Now, I see two ways actually to solve this.
1. If we have a generic location for packages to drop their
html/php/whatever files, like /var/lib/www, all web servers can keep
their DocRoot as /var/www and provide an alias for /var/lib/www, for
instance /debian. That way webapp packages don't even have to care
about the web server in charge, we don't need a webapps-common, we
just need all web servers to provide that alias (or if they can't,
they have to symlink it). Every webapp would be available at
localhost/debian/webapp. Since it's either a symlink or a conffile
that makes this /debian alias, it can be changed by the local
sysadmin without any risks and without touching our packages data.
2. If however all packages put their files in different locations, we
need your suggested solution with scripts for each webserver. A
package like webapps-common could run
foreach server in /usr/share/webapps-common/webservers/*; do
./$server webappPath webappName
done
and the web servers provide aliases/symlinks accordingly.
So, what's wrong with (1) that we don't go this simple path?
Hauke
Attachment:
signature.asc
Description: Digital signature