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

Re: Repository website content as live website

From: Ryan Schmidt <subversion-2005_at_ryandesign.com>
Date: 2005-09-27 18:45:19 CEST

On Sep 27, 2005, at 17:55, Paul Koning wrote:

> One of the parts of my Subversion repository is a subtree that holds
> our internal website content. So of course the latest content is
> visible via a path that looks like
> http://snv.ourstuff.com/repos/oursvn/trunk/intranet/index.html
>
> We already have a virtual host setup, so people are used to
> http://ourintranet.com/
>
> to get to that same material. Right now it's done in CVS, and the
> "live" site is actually a copy (working directory), checked out
> manually or periodically, so it isn't convenient and "live".
>
> I would like to have http://ourintranet.com/ end up at the repository,
> i.e., it's an alias for
> http://snv.ourstuff.com/repos/oursvn/trunk/intranet/. How would I do
> that? Rewrite rules? Alias?

Apache's Alias directive aliases a path in web space to a path in
filesystem space. That won't work, since the HTML files you're
wanting to map in aren't in the filesystem; they're in the repository.

RewriteRule rewrites from URLs to URLs, so that's closer, except that
when crossing hostname boundaries, as you are, it actually has to
issue a Location header to redirect the client. Someone would type in
http://ourintranet.com/, mod_rewrite would issue a redirect, and the
browser's address bar would now show http://snv.ourstuff.com/repos/
oursvn/trunk/intranet/ which is probably not what you want.

If that is what you want, Apache's Redirect command is a simpler
alternative to mod_rewrite.

What you probably want though is to continue to use a working copy of
trunk/intranet and have ourintranet.com's DocumentRoot pointing at
that. This would further enable you to use PHP, Perl, Ruby, Python or
other dynamic content in your site, which you would not be able to do
otherwise. You can write a post-commit hook that updates this working
copy every time someone commits, thereby ensuring that it's always up-
to-date.

This is a FAQ:

http://subversion.tigris.org/faq.html#website-auto-update

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Tue Sep 27 18:47:50 2005

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