[Koha-devel] RFC - installer changes

MJ Ray mjr at phonecoop.coop
Fri Dec 14 19:12:43 CET 2007


Bünzli Daniel <daniel.buenzli at erratique.ch> wrote:
> I managed to avoid virtual hosts by doing the following. But it is  
> really an ugly solution. I installed koha in single mode at $ROOT/ 
> koha. $ROOT is the root from which files are served.
>
> Then I did
>
>  > ln -s $ROOT/intranet/htdocs/intranet-tmpl $ROOT/intranet-tmpl
>  > ln -s $ROOT/opac/htdocs/opac-tmpl $ROOT/opac-tmpl
>  > mkdir -p $ROOT/cgi-bin/koha
>  > cp -R $ROOT/koha/intranet/cgi-bin/* $ROOT/cgi-bin/koha/
>  > cp -R $ROOT/koha/opac/cgi-bin/opac/* $ROOT/cgi-bin/koha/

Yikes!  I thought you were going to use the .htaccess rewrites to
avoid merging the two cgi-bin somehow.  Does this have implications
for cookies and logins... but then, are librarians special readers
anyway?

> And created a $ROOT/.htaccess with the following content (maybe the  
> other rules found in virtual hosts should also go here) :

OK, it's the end of a long week and I've been ill, so let's try some
comments:-

# Make sure perl cgi scripts are running.
> > AddHandler cgi-script .pl

# Start the rewriter.
> > RewriteEngine on
> > RewriteBase /

# Redirect the front pages.
> > RewriteRule ^opac$ cgi-bin/koha/opac-main.pl [R=permanent,L]
> > RewriteRule ^admin$ cgi-bin/koha/mainpage.pl [R=permanent,L]

# The main multi-purpose rewriter.
> > RewriteCond %{QUERY_STRING} (.*?)(?:[A-Za-z0-9_-]+)=&(.*)
> > RewriteRule (.+) $1?%1%2 [N,R,NE]

# Finally, the usual koha config variables.
> > SetEnv KOHA_CONF "$ROOT/koha/etc/koha-conf.xml"
> > SetEnv PERL5LIB "$ROOT/koha/lib"

# - Why a RewriteCond here not a QSA flag on the Rule?
# - Why a Redirect [R] flag on it?  Does that preserve POST data?

Puzzled,
-- 
MJ Ray http://mjr.towers.org.uk/email.html tel:+44-844-4437-237 -
Webmaster-developer, statistician, sysadmin, online shop builder,
consumer and workers co-operative member http://www.ttllp.co.uk/ -
Writing on koha, debian, sat TV, Kewstoke http://mjr.towers.org.uk/





More information about the Koha-devel mailing list