[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Multiple apache vhosts with one repo - which host did the commit came from, and how to record?

From: Eric Johnson <eric_at_tibco.com>
Date: Mon, 15 Sep 2008 09:40:55 -0700

Looking for some advice on how to solve this problem:

(Subversion 1.4.6, Apache 2.2, Gentoo Linux - although I think all but
the linux part doesn't change anything.)

I've got two Apache vhosts (different ports on the same server)
connecting to the same SVN repository. This configuration lets me use
Apache LDAP authorization against two different LDAP servers. This
configuration works just fine.

We've now gotten to to the point that we want to make sure we record
which vhost the request came in on, for a small collection of reasons.

Since Subversion specifically removes almost all environment variables
when executing hook scripts, whatever information Apache might provide
is not available to the hook scripts that I'm writing.

I've come to the conclusion, that if I want to distinguish between the
two hosts in the hook scripts, I have to do something like this:

/home/svn/repos/
    myrepo/ <-- the official copy of the repository
       conf/
       dav/
       db/
       format
       hooks/
       locks/
       README.txt
    myrepo-alternate <-- a "constructed" version
       conf/ <-- soft link to /home/svn/repos/myrepo/conf/
       dav/ <-- soft link ...
       db/ <-- soft link...
       format <-- soft link ...
       hooks/ <-- this one is *not* a soft link.
       locks/ <-- soft link...
       README.txt <-- soft link...

In that way, I can customize the hook scripts for each vhost by pointing
each vhost at the appropriate folder.

Questions:

    * Will this work?
    * Is there a better way?

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: users-help_at_subversion.tigris.org
Received on 2008-09-15 18:41:20 CEST

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.