Nginx+Apache+SSL+SVN svn copy 出现502 Bad Gateway
使用Nginx通过https方式访问SVN服务器,执行svn copy的时候出现以下错误:
svn: Server sent unexpected return value (502 Bad Gateway) in response to COPY request for
解决办法:
location / {
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_buffering on;
set $fixed_destination $http_destination;
if ( $http_destination ~* ^https(.*)$ ) {
set $fixed_destination http$1;
}
proxy_set_header Destination $fixed_destination;
proxy_pass http://127.0.0.1:88;
}
主要是增加了
set $fixed_destination $http_destination;
if ( $http_destination ~* ^https(.*)$ ) {
set $fixed_destination http$1;
}
Nginx 的详细介绍:请点这里
Nginx 的下载地址:请点这里
相关推荐
pub_svnserve.conf的 pub_authz.conf的配置文件有非法字符的原因引起,需要查找pub_authz.conf提的非法内容比如多余的空格删除或直接将pub_authz.conf