如果VisualSVN设置为Nginx proxy_pass
,它将自动重定向到VisualSVN端口。
如果您尝试从A移到A,则将转到B。
https://svn.abcde.com/svn/ABCDE/trunk/com.abcde.web
https://svn.abcde.com**:9444**/svn/ABCDE/trunk/com.abcde.web/
如果您像https://svn.abcde.com/svn/ABCDE/trunk/com.abcde.web/
一样输入,它将正常移动。这似乎是最后一个斜杠的问题。
通常记得httpd 2.4 reverse_proxy。
预先感谢您的帮助。
server {
listen 443 ssl http2 ;
server_name svn.abcde.com;
include /SSL.Cert.conf;
location / {
proxy_pass https://127.0.0.1:9444;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}
Listen "9444" https
LoadModule licensing_visualsvn_module bin/mod_licensing_visualsvn.so
LoadModule auth_basic_module bin/mod_auth_basic.so
LoadModule authn_core_module bin/mod_authn_core.so
LoadModule authz_core_module bin/mod_authz_core.so
LoadModule authn_file_module bin/mod_authn_file.so
LoadModule authz_user_module bin/mod_authz_user.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 visualsvn_module bin/mod_visualsvn.so
LoadModule headers_module bin/mod_headers.so
LoadModule ssl_module bin/mod_ssl.so
LoadModule deflate_module bin/mod_deflate.so
LoadModule deflate_fh_module bin/mod_deflate_fh.so
LoadModule authn_visualsvn_svn_module bin/mod_authn_visualsvn_svn.so
Header always append X-Frame-Options SAMEORIGIN
SVNCompressionLevel 1
DeflateCompressionLevel 1
DeflateAlterETag NoChange
SetOutputFilter DEFLATE_FH;DEFLATE
<Directory />
Options FollowSymLinks
AllowOverride None
RewriteEngine on
RewriteCond %{REQUEST_URI} ^/svn$
RewriteCond %{HTTP_USER_AGENT} !^SVN/
RewriteRule ^(.*/svn)$ %0/ [R=301,L]
</Directory>
RewriteEngine on
RewriteCond %{REQUEST_METHOD} =GET [OR]
RewriteCond %{REQUEST_METHOD} =HEAD
RewriteRule "^/favicon.ico$" "/!/assets/img/favicon.ico" [PT,NS]
<Location />
AuthName "VisualSVN Server"
AuthType Basic
AuthBasicProvider file
AuthUserFile "D:/VisualSVN Server/Repositories/htpasswd"
Require valid-user
</Location>
SVNInMemoryCacheSize 131072
<Location "/svn/">
DAV visualsvn
SVNListParentPath on
SVNParentPath "D:/VisualSVN Server/Repositories"
SVNIndexXSLT "/!/assets/xsl/svnindex-ng.xsl?v=2"
SVNPathAuthz short_circuit
SVNCacheTextDeltas off
SVNCacheFullTexts off
SVNCacheRevProps off
SVNCacheNodeProps on
SVNBlockRead off
SVNAllowBulkUpdates prefer
AuthName "VisualSVN Server"
AuthzVisualSVNMode Subversion
AuthzVisualSVNSubversionReposRelativeAccessFile "VisualSVN-SvnAuthz.ini"
AuthzVisualSVNSubversionGroupsFile "D:/VisualSVN Server/Repositories/groups.conf"
ExpiresActive off
Header always setifempty Content-Security-Policy "default-src 'none'"
</Location>
Alias /! WebUI
<Location /!>
AuthzVisualSVNAuthoritative off
SVNOverrideAll on
DAV off
ExpiresActive on
Header always set Content-Security-Policy "default-src 'none';form-action 'none';connect-src 'self'"
Header always set X-Frame-Options DENY
<IfModule mime_module>
AddCharset utf-8 .css
</IfModule>
</Location>