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

apache restart taking too long, possibility of using mod_rewrite with VirtualHost's

From: Scott Bradley <scottb_at_sharpforge.com>
Date: Sat, 23 Aug 2008 17:17:12 +1000

Hi,

I run an open source application which uses Subversion. It manages the
apache configuration changes required to configure repositories on behalf of
the user. At the moment each configuration is done manually(ie. no dynamic
mod_rewrite). Apache must then be restarted to have the changes reflected.

This works great up to a point but as the number of repositories grows its
taking almost 5 minutes to restart apache now which is unacceptable.

Each configuration is exactly the same so I would like to know if it's
possible to use mod_rewrite and not need to restart apache all the time.
Below are typical configuration files that are created.

#portal1.conf

NameVirtualHost 123.126.181.11:80
<VirtualHost 123.126.181.11:80>
ServerName portal1.svnpath.com:80

<Location /Repos1>
DAV svn
SVNPath C:\Data\SharpForge\Portals\portal1\Repos1

# access control policy for this repo
AuthzSVNAccessFile C:\Data\SharpForge\Portals\portal1\Repos1\svn-auth.conf

# only authenticated users may access the repository
Satisfy Any
Require valid-user

# how to authenticate a user
AuthType Basic
AuthName "Repos1 repository"
AuthUserFile C:\Data\SharpForge\Portals\default\svn-pwd-file

</Location>

<Location /Repos2>
DAV svn
SVNPath C:\WebApps\_Data\SharpForge\Portals\portal1\Repos2

# access control policy for this repo
AuthzSVNAccessFile
C:\WebApps\_Data\SharpForge\Portals\portal1\Repos2\svn-auth.conf

# only authenticated users may access the repository
Satisfy Any
Require valid-user

# how to authenticate a user
AuthType Basic
AuthName "Repos2 repository"
AuthUserFile C:\WebApps\_Data\SharpForge\Portals\default\svn-pwd-file

</Location>
</VirtualHost>

#portal2.conf
NameVirtualHost 123.126.181.11:80
<VirtualHost 123.126.181.11:80>
ServerName portal2.svnpath.com:80
....
#portal3.conf
#portal4.conf
#portal5.conf
#portal6.conf etc.....

I would like to know if you can do something like this.... excuse the
complete ignorance about how mod_rewrite works, this is just to determine if
the concept would work.
#portal.conf
NameVirtualHost 123.126.181.11:80
<VirtualHost 123.126.181.11:80>
ServerName {portalName}.svnpath.com:80

<Location /{reposName}>
DAV svn
SVNPath C:\Data\SharpForge\Portals\{portalName}\{reposName}

# access control policy for this repo
AuthzSVNAccessFile
C:\Data\SharpForge\Portals\{portalName}\{reposName}\svn-auth.conf

# only authenticated users may access the repository
Satisfy Any
Require valid-user

# how to authenticate a user
AuthType Basic
AuthName "{reposName} repository"
AuthUserFile C:\Data\SharpForge\Portals\default\svn-pwd-file

</Location>
</VirtualHost>

Any assistance is most appreciated.
Regards,
Scott.
Received on 2008-08-23 19:37:48 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.