Re: Setting a web page at the repositories' parent URL

2010-11-05 Thread Ryan Schmidt
On Nov 5, 2010, at 10:12, Gingko wrote:

 According to the documentation, if I set a configuration like this one :
 
 Location /svn
   DAV svn
   SVNParentPath /var/lib/svn
 /Location
 
 ... I define a parent directory under which I can put all of my repositories.
 
 So I can access them like this :
 
 http://www.myserver.com/svn/my_first_repository/
 http://www.myserver.com/svn/my_second_repository/
 http://www.myserver.com/svn/my_third_repository/
 http://www.myserver.com/svn/my_fourth_repository/
 etc.
 
 But if I just type :
 http://www.myserver.com/svn/
 
 I get a page like this one:
 
 --
 Forbidden
 You don't have permission to access /svn/ on this server.
 
 Apache/2.2.9 (Debian) DAV/2 SVN/1.6.12 PHP/5.2.13 mod_perl/2.0.4 Perl/v5.10.0 
 Server at www.myserver.com Port 80
 --
 
 This is quite ugly, and I saw several SVN servers exhibiting this behavior.
 
 Is there a way to put a web page on this location?
 
 (for example a blank page, or a page with links to the only repositories that 
 I want to be publicly accessible for reading)

The only option available is SVNListParentPath On which will give you a list 
of links to the available repositories.



Re: Setting a web page at the repositories' parent URL

2010-11-05 Thread Ryan Schmidt
On Nov 5, 2010, at 10:36, Ryan Schmidt wrote:

 On Nov 5, 2010, at 10:12, Gingko wrote:
 
 Is there a way to put a web page on this location?
 
 (for example a blank page, or a page with links to the only repositories 
 that I want to be publicly accessible for reading)
 
 The only option available is SVNListParentPath On which will give you a 
 list of links to the available repositories.

That is to say, SVNListParentPath is the only mod_dav_svn-specific option 
available to affect this. And there's also SVNIndexXSLT with which you can 
specify an XSLT stylesheet to change the appearance of that index. But you 
could probably make the web server deliver any other kind of page you wanted, 
by using the directives of the standard Apache modules (e.g. mod_alias, 
mod_rewrite, etc.).



RE: Setting a web page at the repositories' parent URL

2010-11-05 Thread Eramo, Mark
Hi Gingko
   I have had success setting up several repositories in Apache as follows...

In the httpd-subversion.conf file, I have the various repositories defined like 
this.

Location /svn/repo1
   SVNPath /path/to/repo1
.
.
.
/Location

Location /svn/repo2
   SVNPath /path/to/repo2
.
.
.
/Location

Location /svn/repo3
   SVNPath /path/to/repo3
.
.
.
/Location

Then when I hit http://server/svn/repo1, I get access to repo1, I hit 
http://server/svn/repo1, I get access to repo2, etc. 

If you use SVNParentPath instead of SVNPath, you can have issues so this seems 
to work well for me. 

As far as a web page goes, you could create a custom index.html that has all 
the links to the various repositories so if users just goes right to 
http://server, they see the custom index.html which has all the repository 
links.  
There should already be a default index.html in the Apache /htdocs folder that 
has It Works! in it. You could just back that one up and replace it with a 
new index.html that has the links to all the repositories.

Regards,
Mark



-Original Message-
From: Gingko [mailto:from_tig...@nospam.homelinux.org] 
Sent: Friday, November 05, 2010 11:12 AM
To: Subversion User List
Subject: Setting a web page at the repositories' parent URL

Hello,

I have a question concerning the mod_dav_svn module that Apache use for 
accessing the repositories.

According to the documentation, if I set a configuration like this one :

Location /svn
DAV svn
SVNParentPath /var/lib/svn
/Location

... I define a parent directory under which I can put all of my repositories.

So I can access them like this :

http://www.myserver.com/svn/my_first_repository/
http://www.myserver.com/svn/my_second_repository/
http://www.myserver.com/svn/my_third_repository/
http://www.myserver.com/svn/my_fourth_repository/
etc.

But if I just type :
http://www.myserver.com/svn/

I get a page like this one:

--
Forbidden
You don't have permission to access /svn/ on this server.

Apache/2.2.9 (Debian) DAV/2 SVN/1.6.12 PHP/5.2.13 mod_perl/2.0.4
Perl/v5.10.0 Server at www.myserver.com Port 80
--

This is quite ugly, and I saw several SVN servers exhibiting this behavior.

Is there a way to put a web page on this location?

(for example a blank page, or a page with links to the only repositories that I 
want to be publicly accessible for reading)

Best regards,

GIngko




Re: Setting a web page at the repositories' parent URL

2010-11-05 Thread Ryan Schmidt
On Nov 5, 2010, at 13:50, Eramo, Mark wrote:

   I have had success setting up several repositories in Apache as follows...
 
 In the httpd-subversion.conf file, I have the various repositories defined 
 like this.
 
 Location /svn/repo1
   SVNPath /path/to/repo1
 .
 .
 .
 /Location
 
 Location /svn/repo2
   SVNPath /path/to/repo2
 .
 .
 .
 /Location
 
 Location /svn/repo3
   SVNPath /path/to/repo3
 .
 .
 .
 /Location
 
 Then when I hit http://server/svn/repo1, I get access to repo1, I hit 
 http://server/svn/repo1, I get access to repo2, etc. 

That's exactly what SVNParentPath is supposed to let you do more easily and 
concisely.


 As far as a web page goes, you could create a custom index.html that has all 
 the links to the various repositories so if users just goes right to 
 http://server, they see the custom index.html which has all the repository 
 links.  
 There should already be a default index.html in the Apache /htdocs folder 
 that has It Works! in it. You could just back that one up and replace it 
 with a new index.html that has the links to all the repositories.

That's exactly what SVNListParentPath is for.


 If you use SVNParentPath instead of SVNPath, you can have issues so this 
 seems to work well for me. 

What issues are you referring to?




RE: Setting a web page at the repositories' parent URL

2010-11-05 Thread Eramo, Mark
I had issues with SVNParentPath but I think it was how I set it up. When I set 
it up the way I showed, it worked well.  When I was doing this, I did not find 
docs that explained SVNParentPath well enough to me so maybe that is why I had 
the setup issues. 

Regards,
Mark


-Original Message-
From: Ryan Schmidt [mailto:subversion-20...@ryandesign.com] 
Sent: Friday, November 05, 2010 3:05 PM
To: Eramo, Mark
Cc: Subversion User List
Subject: Re: Setting a web page at the repositories' parent URL

On Nov 5, 2010, at 13:50, Eramo, Mark wrote:

   I have had success setting up several repositories in Apache as follows...
 
 In the httpd-subversion.conf file, I have the various repositories defined 
 like this.
 
 Location /svn/repo1
   SVNPath /path/to/repo1
 .
 .
 .
 /Location
 
 Location /svn/repo2
   SVNPath /path/to/repo2
 .
 .
 .
 /Location
 
 Location /svn/repo3
   SVNPath /path/to/repo3
 .
 .
 .
 /Location
 
 Then when I hit http://server/svn/repo1, I get access to repo1, I hit 
 http://server/svn/repo1, I get access to repo2, etc. 

That's exactly what SVNParentPath is supposed to let you do more easily and 
concisely.


 As far as a web page goes, you could create a custom index.html that has all 
 the links to the various repositories so if users just goes right to 
 http://server, they see the custom index.html which has all the repository 
 links.  
 There should already be a default index.html in the Apache /htdocs folder 
 that has It Works! in it. You could just back that one up and replace it 
 with a new index.html that has the links to all the repositories.

That's exactly what SVNListParentPath is for.


 If you use SVNParentPath instead of SVNPath, you can have issues so this 
 seems to work well for me. 

What issues are you referring to?




Re: Setting a web page at the repositories' parent URL

2010-11-05 Thread Ryan Schmidt
On Nov 5, 2010, at 14:11, Eramo, Mark wrote:

 Ryan Schmidt wrote:
 
 On Nov 5, 2010, at 13:50, Eramo, Mark wrote:
 
  I have had success setting up several repositories in Apache as follows...
 
 In the httpd-subversion.conf file, I have the various repositories defined 
 like this.
 
 Location /svn/repo1
  SVNPath /path/to/repo1
 .
 .
 .
 /Location
 
 Location /svn/repo2
  SVNPath /path/to/repo2
 .
 .
 .
 /Location
 
 Location /svn/repo3
  SVNPath /path/to/repo3
 .
 .
 .
 /Location
 
 Then when I hit http://server/svn/repo1, I get access to repo1, I hit 
 http://server/svn/repo1, I get access to repo2, etc. 
 
 That's exactly what SVNParentPath is supposed to let you do more easily and 
 concisely.
 
 
 As far as a web page goes, you could create a custom index.html that has 
 all the links to the various repositories so if users just goes right to 
 http://server, they see the custom index.html which has all the repository 
 links.  
 There should already be a default index.html in the Apache /htdocs folder 
 that has It Works! in it. You could just back that one up and replace it 
 with a new index.html that has the links to all the repositories.
 
 That's exactly what SVNListParentPath is for.
 
 
 If you use SVNParentPath instead of SVNPath, you can have issues so this 
 seems to work well for me. 
 
 What issues are you referring to?
 
 I had issues with SVNParentPath but I think it was how I set it up. When I 
 set it up the way I showed, it worked well.  When I was doing this, I did not 
 find docs that explained SVNParentPath well enough to me so maybe that is why 
 I had the setup issues. 

For what you showed, it should simply be:

Location /svn/
 SVNPath /path/to/
 SVNListParentPath On
/Location

That's it.




Re: Setting a web page at the repositories' parent URL

2010-11-05 Thread Ryan Schmidt
On Nov 5, 2010, at 14:19, Ryan Schmidt wrote:

 For what you showed, it should simply be:
 
 Location /svn/
 SVNPath /path/to/
 SVNListParentPath On
 /Location


And if I'd type it correctly, it would be:

Location /svn/
DAV svn
SVNParentPath /path/to/
SVNListParentPath On
/Location



Re: Setting a web page at the repositories' parent URL

2010-11-05 Thread Ryan Schmidt

On Nov 5, 2010, at 14:38, Gingko wrote:

 That's exactly what SVNParentPath is supposed to let you do more easily and 
 concisely.
 
 Except that it locks the possibility to have any other (custom) content at 
 the parent path.

As I said earlier in the thread, I'll guess you can already achieve that using 
mod_rewrite or possibly mod_alias.



Re: Setting a web page at the repositories' parent URL

2010-11-05 Thread Gingko
- Original Message - 
From: Ryan Schmidt subversion-20...@ryandesign.com

To: Gingko from_tig...@nospam.homelinux.org
Cc: Subversion User List users@subversion.apache.org
Sent: Friday, November 05, 2010 8:48 PM
Subject: Re: Setting a web page at the repositories' parent URL





On Nov 5, 2010, at 14:38, Gingko wrote:

 That's exactly what SVNParentPath is supposed to let you do more easily 
 and concisely.


 Except that it locks the possibility to have any other (custom) content 
 at the parent path.


As I said earlier in the thread, I'll guess you can already achieve that 
using mod_rewrite or possibly mod_alias.


Of course.

But I would say that this is a little less .. neat.

(and also this will probably mean that I will have to put this page on 
another web site, or in a parent directory of the parent directory if there 
is one, as I will probably not be able to rewrite in such a way that I could 
access a page physically located at the SVN parent directory)


Gingko