我最近设置了VisualSVN Server。而不是在以下位置访问服务器:
http://server/svn/repo/
我希望将它放在更好的网址上:
http://server/repo/
为实现这一目标,我更改了C:\ Program Files(x86)\ VisualSVN Server \ conf \ httpd.conf中的Location参数:
<Location /svn/>
改为:
<Location />
使用TortoiseSVN访问存储库时,此工作正常,但现在使用浏览器查看存储库已被破坏。网页验证正常,但浏览器只获得一个空页。
Windows Server事件查看器在尝试进行Web浏览时显示此错误:
Failed to load the AuthzVisualSVNReposRelativeAccessFile:
Can't open file 'D:\\Repositories\\svnindex.xsl\\conf\\VisualSVN-WinAuthz.ini':
The system cannot find the path specified.
这似乎与查找D:\ Repositories \的服务器有关,而不是在C:\ Program Files(x86)\ VisualSVN Server \ htdocs \中查找身份验证文件。
是否可以通过浏览器访问缩短的URL和repo?
如果有帮助,这里是httpd.conf文件:
ThreadsPerChild 128
MaxMemFree 64
MaxRequestsPerChild 0
MaxKeepAliveRequests 2000
KeepAliveTimeout 5
Win32DisableAcceptEx
LimitXMLRequestBody 0
LimitRequestFieldSize 16384
SendBufferSize 131072
ServerRoot "C:/Program Files (x86)/VisualSVN Server"
ServerName "server.domain.local:80"
ServerSignature Off
ServerTokens Prod
DocumentRoot "htdocs"
FileETag MTime Size
PidFile "${TEMP}\VisualSVNServer.pid"
Listen "192.168.0.11:80"
LoadModule auth_basic_module bin/mod_auth_basic.so
LoadModule authn_file_module bin/mod_authn_file.so
LoadModule authn_visualsvn_module bin/mod_authn_visualsvn.so
LoadModule authz_visualsvn_module bin/mod_authz_visualsvn.so
LoadModule alias_module bin/mod_alias.so
LoadModule dir_module bin/mod_dir.so
LoadModule mime_module bin/mod_mime.so
LoadModule setenvif_module bin/mod_setenvif.so
LoadModule rewrite_module bin/mod_rewrite.so
LoadModule expires_module bin/mod_expires.so
LoadModule dav_module bin/mod_dav.so
LoadModule dav_svn_module bin/mod_dav_svn.so
# LoadModule ssl_module bin/mod_ssl.so
<Directory />
Options FollowSymLinks
AllowOverride None
RewriteEngine on
RewriteCond %{REQUEST_URI} ^/svn$
RewriteCond %{HTTP_USER_AGENT} !^SVN/
RewriteRule ^(.*/svn)$ %0/ [R=301,L]
</Directory>
SVNInMemoryCacheSize 16384
<Location />
DAV svn
SVNListParentPath on
SVNParentPath "D:/Repositories/"
SVNIndexXSLT "/svnindex.xsl"
SVNPathAuthz short_circuit
SVNCacheTextDeltas off
SVNCacheFullTexts off
SVNAllowBulkUpdates prefer
AuthName "VisualSVN Server"
AuthType VisualSVN
AuthzVisualSVNReposRelativeAccessFile "VisualSVN-WinAuthz.ini"
AuthzVisualSVNGlobalAccessFile "D:/Repositories/VisualSVN-GlobalWinAuthz.ini"
AuthnVisualSVNBasic on
AuthnVisualSVNIntegrated off
AuthnVisualSVNUPN On
require valid-user
# Add Expires/Cache-Control header explictly
ExpiresActive on
ExpiresDefault access
</Location>
BrowserMatch "(\s|^)neon/\d+.\d+.\d+(\s|$)" AuthnVisualSVNIgnoreReauth
BrowserMatch "(\s|^)neon/\d+.\d+.\d+(\s|$)" AuthnVisualSVNDisableNegotiate
Alias /web-ui-static htdocs/web-ui-static
<IfModule dir_module>
DirectoryIndex index.html
</IfModule>
ErrorLog nul
LogLevel error
TraceEnable off
DefaultType text/plain
<IfModule mime_module>
TypesConfig conf/mime.types
AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz
AddType application/x-x509-ca-cert .crt
AddType application/x-pkcs7-crl .crl
</IfModule>
<IfModule ssl_module>
SSLEngine on
SSLRandomSeed startup builtin
SSLRandomSeed connect builtin
SSLPassPhraseDialog builtin
SSLSessionCache "shm:D:/Repositories/ssl_scache"
SSLSessionCacheTimeout 300
SSLMutex default
SSLCertificateFile certs/server.pem
SSLCertificateKeyFile certs/server.pem
SSLProtocol -ALL +SSLv3 +TLSv1
SSLCipherSuite ALL:!aNULL:!ADH:!eNULL:!LOW:!EXP:RC4+RSA:+HIGH:+MEDIUM
SetEnvIf User-Agent ".*MSIE.*" ssl-unclean-shutdown
</IfModule>
Include conf/httpd-custom.conf
答案 0 :(得分:1)
从VisualSVN Server 3.5 it is possible to customize the repository URL prefix开始。换句话说,现在您只需点击几下即可将回复网址从http://server/svn/repo/
更改为http://server/repo/
。
要自定义网址前缀,请按以下步骤操作:
您可以选择“清空URL前缀”选项以完全删除“/ svn”前缀或选择“自定义URL前缀”并指定您要在URL中使用的前缀(例如,“repos”)。