搬砖仔

  • {{ item.name }}
  • 首页
  • 作品
  • 代码
  • GO
  • 随笔
  • 关于博主
  • 友情链接
  • 文章归档
  • 榜上有名
  • Mail
  • GitHub

Nginx+Apache+SSL+SVN svn copy 出现502 Bad Gateway

  • 小酱沫
  • 2017-02-10
  • 3

使用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:8080;
}

主要是增加了


set $fixed_destination $http_destination;
if ( $http_destination ~* ^https(.*)$ ) {
set $fixed_destination http$1;
}
© 2023 搬砖仔
Theme by Wing
沪ICP备2021031606号-1 沪公网安备31010402004615号