阿里云-云小站(无限量代金券发放中)
【腾讯云】云服务器、云数据库、COS、CDN、短信等热卖云产品特惠抢购

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

142次阅读
没有评论

共计 934 个字符,预计需要花费 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:88;
    }

主要是增加了

set $fixed_destination $http_destination;
        if ($http_destination ~* ^https(.*)$ ) {
            set $fixed_destination http$1;
        }

Nginx 502 错误触发条件与解决办法汇总 http://www.linuxidc.com/Linux/2014-08/105815.htm

502 bad gateway 是什么意思?502 bad gateway 怎么解决!http://www.linuxidc.com/Linux/2013-04/82075.htm

Nginx 的详细介绍 :请点这里
Nginx 的下载地址 :请点这里

正文完
星哥说事-微信公众号
post-qrcode
 
星锅
版权声明:本站原创文章,由 星锅 2022-01-20发表,共计934字。
转载说明:除特殊说明外本站文章皆由CC-4.0协议发布,转载请注明出处。
【腾讯云】推广者专属福利,新客户无门槛领取总价值高达2860元代金券,每种代金券限量500张,先到先得。
阿里云-最新活动爆款每日限量供应
评论(没有评论)
验证码
【腾讯云】云服务器、云数据库、COS、CDN、短信等云产品特惠热卖中