Forum Moderators: phranque

Message Too Old, No Replies

How to set (NameVirturalHost's )DocumentRoot for a SVN repository?

         

tntpower

7:34 am on Jan 23, 2009 (gmt 0)

10+ Year Member



I have a SVN repository on my server, which can be accessed by mydomain.com/repos/project.

I want to create a NameVirtualHost that use the project's repository as DocumentRoot so that I can use project.mydomain.com to access my project,install it, run it and test it.

PHP files on mydomain.com/repos/project are not executable. I tried to find the physical path of project repository but I cannot. There are no my project files in /var/www/svn/project

Thank you,


Here is my SVN conf

<Location /repos>
DAV svn
SVNParentPath /var/www/svn/

# Limit write permission to list of valid users.
<LimitExcept GET PROPFIND OPTIONS REPORT>
# Require SSL connection for password protection.
# SSLRequireSSL

AuthType Basic
AuthName "Authorization Realm"
AuthUserFile /var/www/html/admin/.htpasswd
Require valid-user
</LimitExcept>
</Location>

Caterham

5:54 pm on Jan 25, 2009 (gmt 0)

10+ Year Member



SVN is complex and operates on a uri-basis.

What you can do is to create your <virtualhost> and modify requests so that /repos resolves to /repos/project

RewriteEngine on
RewriteCond $1 !^project
RewriteRule ^/repos/(.*) /repos/project/$1 [PT]

tntpower

11:52 pm on Jan 25, 2009 (gmt 0)

10+ Year Member



Thanks. But how to set up DocumentRoot and Directory?