lilypond-user
[Top][All Lists]
Advanced

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

Re: anybody know apache? (dir structure of docs)


From: Matthias Kilian
Subject: Re: anybody know apache? (dir structure of docs)
Date: Thu, 12 Nov 2009 23:00:02 +0100
User-agent: Mutt/1.4.2.3i

On Thu, Nov 12, 2009 at 10:34:19PM +0100, Reinhold Kainhofer wrote:
> > > Can't we have the directory structure internally with /web/ ,
> > > /download/ what have you, and use some serverside URL rewriting to
> > > make translate
> > >
> > >  /foo/
> > >
> > > into
> > >
> > >  /web/foo/
[...]
> Yes, of course. Just use the mod_rewrite module (if its not already enabled, 
> run "a2enmod rewrite").

And if the system serving lilypond.org doesn't have this command, you
need something like

LoadModule rewrite_module       /usr/lib/apache/modules/mod_rewrite.so

in the apache config file.

> In the .htaccess file in the server's base web directory (i.e. the dir that 
> contains web/), simply add:

If possible (i.e. if you've the permission to edit the apache config
file on the server), put the directives (RewriteEngine on etc.)
into the config file or into the virtual host section for lilypond.org
(the latter should be a symlink somewhere in /etc/apache*/sites-enabled
on typical linux systems, or somewhere on /var/www/conf on bsd
systems).

Using .htaccess has some disadvantages wrt performance and security,
it must be allowed in the global or virtual host config, and there's
always the danger to break things by accident when rsync'ing a new
version of the lilypond site to the server.

> RewriteCond %{REQUEST_FILENAME} !-f
> RewriteCond %{REQUEST_FILENAME} !-d
> RewriteRule ^(.*)$ /web/$1 [QSA,L]

Or even something like

        RewriteRule ^(/foo/.*) /web$1   [QSA,L]
        RewriteRule ^(/bar/.*) /downloads$1     [QSA,L]

if different stuff should be rewritten to different physical
locations. BTW, I don't think the QSA is needed for the lilypond
site.

Ciao,
        Kili

-- 
Communism is a great idea when all the slaves are forced into it.
                -- Theo de Raadt




reply via email to

[Prev in Thread] Current Thread [Next in Thread]