svnでリネームをすると、502 ‘Bad Gateway’ エラーが発生

AWS

これまでの記事で紹介した設定のうえで、AWS上のEC2にApacheがあり、そこでDAVでsvnが動作してる、という構成になっています。

DAVとsvnの関係確認

DAVでsvnが動作してる、という理解自体あまもせずに進めてきたので、念のため確認。

yum list installed | grep dav
mod_dav_svn.x86_64

確かに、DAVでsvn動作させるモジュールが動いてそうです。

Apacheログ確認

Apacheのログを見ると、

172.31.32.143 – codecreare [24/Aug/2019:11:13:30 +0900] “DELETE /svn/webapps/!svn/txr/2399-1ux/trunk/Function/Auth/Auth_PasswordChg.html HTTP/1.1” 204 – “-” “SVN/1.9.7 (x64-microsoft-windows) serf/1.3.9 TortoiseSVN-1.9.7.27907”
172.31.32.143 – codecreare [24/Aug/2019:11:13:30 +0900] “COPY /svn/webapps/!svn/rvr/2399/trunk/Function/Auth/Auth_PasswordChg.html HTTP/1.1” 502 253 “-” “SVN/1.9.7 (x64-microsoft-windows) serf/1.3.9 TortoiseSVN-1.9.7.27907”
172.31.32.143 – codecreare [24/Aug/2019:11:13:31 +0900] “DELETE /svn/webapps/!svn/txn/2399-1ux HTTP/1.1” 204 – “-” “SVN/1.9.7 (x64-microsoft-windows) serf/1.3.9 TortoiseSVN-1.9.7.27907”

で502を返しています。

対処


“svn 502 COPY”でGoogle検索して、一番わかりやすく説明されてたのが下記記事。

502 Bad Gateway with SVN copy, move or rename behind a reverse proxy – IGR IT blog

上記記事の中で引用されている、

http://www.dscentral.in/2013/04/04/502-bad-gateway-svn-copy-reverse-proxy/

に仕組みも説明されています。

headers_moduleの確認

headers_module.soがそもそも有効か、確認。
/etc/httpd で、

grep Lo.mod_ conf/* | grep headers_module

conf.modules.d/00-base.conf:LoadModule headers_module modules/mod_headers.so

でロードされてそうです。

confファイルの変更

svnインストール したときに、
/etc/httpd/conf.d/subversion.conf
をsvnの設定ファイルにしていますので、ここに、
RequestHeader edit Destination ^https http early
を追記します。

<IfModule dav_svn_module>
    RequestHeader edit Destination ^https http early
    <Location /svn>
        DAV                     svn
        SVNListParentPath       on
        SVNParentPath           /srv/svn/repos

ファイル名変更できました。

コメント

タイトルとURLをコピーしました