Seems like this should be a simple question:
Where does apache keep 开发者_如何转开发the index.html file that is used when browsing the repository?
Those html pages are generated by the mod_dav_svn module. They don't have a html page as a template or something like that.
But if you want to customize the look of those generated pages, you can do so with an xml transformation file (xsl).
To enable this feature, first create an xsl file or take one of the many examples from the web. Then add the line
SVNIndexXSLT "/path/to/custom.xsl"
and restart Apache.
You can find an example style sheet in the TortoiseSVN repository. (use "guest" as username, leave password empty).
Apache uses a number of "modules" for handling various different aspects of its operation. It hands of requests and processing to these modules and then forwards their responses (through another chain of handlers) the response to the client.
One of these handlers mod_davsvn (I might not recall the name correctly) is responsible for handling any "processing" of urls that are identified as SVN repo paths. When you contact one of these paths, apache hands the processing off to the svn handler, which "pretends" to find the required page and return its contents. In truth it builds the response from data in the repo and returns it.
huh? There is no .html file; subversion through some apache module simply feeds apache the HTML directly.
Apache doesn't use a .html file for browsing repositories. Rather, there is a .svn folder that apache understands by virtue of the following modules:
dav_svn.conf
dav_svn.load
On Ubuntu you can run an apt-install subversion to get most everything set up correctly but you'll need to make sure that you update apache to find the above modules and also put something like the following in the apache conf file:
<Location /somewebsite>
DAV svn
SVNParentPath /home/www/svn/somewebsite
SVNListParentPath On
AuthType Basic
AuthName "Subversion Repository"
AuthUserFile /home/www/svn/.htpasswd
<Limit GET PROPFIND OPTIONS REPORT>
Require valid-user
</Limit>
</Location>
Note that I have it set up to check for passwords when accessing the repository. After you restart apache and have your password set up you should be able to go to http://www.somewebsite.com/somewebsite and see your svn repository. You'll see the actually file within the repository rather than the repository structure itself. If you want to see the repository structure you can use Apache alias in the conf file.
Alias /test2 /home/www/svn/[folder that houses these directories: conf dav db format hooks locks README.txt]
精彩评论