[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: dir-or-file-in-var-www on single-HTML file web "apps" or the like

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

Naturally those symlinks will now be created manually and will typically
be absolute as nobody bothers with proper relative symlinks where you
don't have tab completion for your aid. But I guess that's not a real

> > and many of these other web servers provide a feature similar to Alias.
> > with respect to those that don't, it's been previously discussed and
> > deemed okay for them not to work out of the box, which is a relatively
> > small cost for the benefit of FHS compliance and general safety/sanity.
> OK on those without Alias, but how about whose that do have Alias-es? Do
> you have a list of them and which file ship? Do you have some kind of
> intermediate level where the maintainer can specify the Alias only once
> and have it "compiled" to all web server configurations?

OK. Now in the role of a "package maintainer fairly familiar with apache
config and not with anything else". I have avoided installing the
specific packages of the httpds on my system because I'm lazy. Remember
that this is work you want many package maintainers to do.

I looked at nginx, lighttpd and cherokee. IIRC aolserver4 and caudium
are also configurable enough.

Based on e.g. http://wiki.nginx.org/NginxFullExample2

Would require something along the lines of:

location /foo {
  root /usr/share/foo;

I have no idea how this interacts with other parts of the config. Is it
safe to just include in a random config? Anything else that should
probably be there?

At first glance there does not seem to be a directory equivalent to
/etc/apache2/conf.d , and thus I can't simply tell the user to copy an
example file somewhere.



alias.url = ( "/foo/" => "/usr/share/foo/")

[Once again, I have no idea about interactions and such.]


1. Make sure mod_alias is enabled [Is it enabled by default? Any stanza
   instructions a-la a2enmod?]. 
2. Copy the example configuration file:

  cp /usr/share/doc/foo/examples/foo-lighttpd.conf \

3. Refresh lighttpd and reload it [How, exactly?]

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.

Tzafrir Cohen         | tzafrir@jabber.org | VIM is
http://tzafrir.org.il |                    | a Mutt's
tzafrir@cohens.org.il |                    |  best
ICQ# 16849754         |                    | friend

Reply to: