ПРОЕКТЫ 


  АРХИВ 


Apache-Talk @lexa.ru 

Inet-Admins @info.east.ru 

Filmscanners @halftone.co.uk 

Security-alerts @yandex-team.ru 

nginx-ru @sysoev.ru 


  СТАТЬИ 


  ПЕРСОНАЛЬНОЕ 


  ПРОГРАММЫ 



ПИШИТЕ
ПИСЬМА












     АРХИВ :: nginx-ru
Nginx-ru mailing list archive (nginx-ru@sysoev.ru)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Существует ли возможность проксировать к dav_svn


  • To: nginx-ru@xxxxxxxxx
  • Subject: Re: Существует ли возможность проксировать к dav_svn
  • From: Alex Belyanskiy <alex.barut@xxxxxxxxx>
  • Date: Sun, 25 Mar 2012 23:22:23 +0400
  • Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=1E9zxpDG0UUnTEMhReDZCrQNq9U5U2RxTjjEdCXRP/0=; b=li2kCLgZ39wSofA2J40dvZ+4D7BFGdBL9ZGP6/rFgF5NFH0HL8TSqjhF4DqPEroiEs okE+P9R8l4NPhcE/cmGlBo6y2Qy0Ku9wSU/bqoMhbeEYMr8TV74Cxt+MX7jkoXRZfC5M rEeBFKhz4YXH6p5UsNONOZ3OGPVs6+wrucy99okj3pLIMuJmiogljZZrtmQxL0iyYIZz YuRY3SHqDdNik3i4cr1/J/Qbj85DOd5YHG2zM5fffiW/ox77M+khhxFS4DPboYFUMJGK lCm8IOHDUyjonFwa1s+C28qd78KA0lx9qalGdf5h6Y1x3Z6AN/CzgILiNG18eyTgHEGe FkvQ==
  • In-reply-to: <717008307.20120326010615@ngs.ru>
  • References: <4F6F3595.7010402@gmail.com> <717008307.20120326010615@ngs.ru>

server {
    listen 10.23.15.15;
    server_name ~^(?<sub>.+)\.svn\.host\.ru$;

    location / {
        if ($request_method ~ PROPFIND|REPORT ){
            rewrite     ^/daca(.*) $1 last;
        }
    proxy_pass http://$sub.svn.host.ru:8000/$sub$uri;
    }
}

Опечатался первый раз в реврайте. Суть реврайта в том что URI дублируется имя при проксировании этих методов. Т.е. в логах у меня получалось /daca/daca/ и соответственно 404 ошибка. В мануале почитал, в общем $sub туда поставить нельзя будет и я так понимаю что для каждого поддомена будет свой такой реврайт. Если ошибаюсь поправьте, пожалуйста.

svn checkout http://daca.svn.host.ru/ ./
Authentication realm: <http://daca.svn.host.ru:80> DACA
Password for 'telteron':
svn: Unusable URI: it does not refer to this repository

в access.log в апаче
10.23.15.15 - - [25/Mar/2012:22:47:41 +0400] "OPTIONS /daca/ HTTP/1.0" 401 546 10.23.15.15 - telteron [25/Mar/2012:22:47:45 +0400] "OPTIONS /daca/ HTTP/1.0" 200 184 10.23.15.15 - telteron [25/Mar/2012:22:47:45 +0400] "PROPFIND /daca/ HTTP/1.0" 207 639 10.23.15.15 - telteron [25/Mar/2012:22:47:45 +0400] "PROPFIND /daca/!svn/vcc/default HTTP/1.0" 207 392 10.23.15.15 - telteron [25/Mar/2012:22:47:45 +0400] "PROPFIND /daca/!svn/bln/117 HTTP/1.0" 207 447 10.23.15.15 - telteron [25/Mar/2012:22:47:45 +0400] "PROPFIND /daca/ HTTP/1.0" 207 639 10.23.15.15 - telteron [25/Mar/2012:22:47:45 +0400] "PROPFIND /daca/!svn/vcc/default HTTP/1.0" 207 392 10.23.15.15 - telteron [25/Mar/2012:22:47:45 +0400] "PROPFIND /daca/!svn/bln/117 HTTP/1.0" 207 447 10.23.15.15 - telteron [25/Mar/2012:22:47:45 +0400] "PROPFIND /daca/ HTTP/1.0" 207 639 10.23.15.15 - telteron [25/Mar/2012:22:47:45 +0400] "PROPFIND /daca/!svn/vcc/default HTTP/1.0" 207 447 10.23.15.15 - telteron [25/Mar/2012:22:47:45 +0400] "PROPFIND /daca/!svn/bc/117 HTTP/1.0" 207 651 10.23.15.15 - - [25/Mar/2012:22:47:45 +0400] "OPTIONS /daca/ HTTP/1.0" 401 546 10.23.15.15 - telteron [25/Mar/2012:22:47:45 +0400] "OPTIONS /daca/ HTTP/1.0" 200 184 10.23.15.15 - telteron [25/Mar/2012:22:47:45 +0400] "PROPFIND /daca/ HTTP/1.0" 207 639 10.23.15.15 - telteron [25/Mar/2012:22:47:45 +0400] "PROPFIND /daca/ HTTP/1.0" 207 639 10.23.15.15 - telteron [25/Mar/2012:22:47:45 +0400] "PROPFIND /daca/!svn/vcc/default HTTP/1.0" 207 392 10.23.15.15 - telteron [25/Mar/2012:22:47:45 +0400] "PROPFIND /daca/!svn/bln/117 HTTP/1.0" 207 447 10.23.15.15 - telteron [25/Mar/2012:22:47:45 +0400] "PROPFIND /daca/ HTTP/1.0" 207 639 10.23.15.15 - telteron [25/Mar/2012:22:47:45 +0400] "PROPFIND /daca/!svn/vcc/default HTTP/1.0" 207 392 10.23.15.15 - telteron [25/Mar/2012:22:47:45 +0400] "PROPFIND /daca/!svn/bln/117 HTTP/1.0" 207 447 10.23.15.15 - telteron [25/Mar/2012:22:47:45 +0400] "REPORT /daca/!svn/vcc/default HTTP/1.0" 500 246

Error.log апача.
[Sun Mar 25 22:47:45 2012] [error] [client 10.23.15.15] Could not parse 'src-path' URL. [500, #190001] [Sun Mar 25 22:47:45 2012] [error] [client 10.23.15.15] Unusable URI: it does not refer to this repository [500, #190001]

access.log в Nginx
10.23.15.14 - - [25/Mar/2012:22:47:41 +0400] "OPTIONS / HTTP/1.1" 401 546 "-" "SVN/1.6.16 (r1073529) neon/0.29.6" "-" 10.23.15.14 - telteron [25/Mar/2012:22:47:45 +0400] "OPTIONS / HTTP/1.1" 200 184 "-" "SVN/1.6.16 (r1073529) neon/0.29.6" "-" 10.23.15.14 - telteron [25/Mar/2012:22:47:45 +0400] "PROPFIND / HTTP/1.1" 207 639 "-" "SVN/1.6.16 (r1073529) neon/0.29.6" "-" 10.23.15.14 - telteron [25/Mar/2012:22:47:45 +0400] "PROPFIND /daca/!svn/vcc/default HTTP/1.1" 207 392 "-" "SVN/1.6.16 (r1073529) neon/0.29.6" "-" 10.23.15.14 - telteron [25/Mar/2012:22:47:45 +0400] "PROPFIND /daca/!svn/bln/117 HTTP/1.1" 207 447 "-" "SVN/1.6.16 (r1073529) neon/0.29.6" "-" 10.23.15.14 - telteron [25/Mar/2012:22:47:45 +0400] "PROPFIND / HTTP/1.1" 207 639 "-" "SVN/1.6.16 (r1073529) neon/0.29.6" "-" 10.23.15.14 - telteron [25/Mar/2012:22:47:45 +0400] "PROPFIND /daca/!svn/vcc/default HTTP/1.1" 207 392 "-" "SVN/1.6.16 (r1073529) neon/0.29.6" "-" 10.23.15.14 - telteron [25/Mar/2012:22:47:45 +0400] "PROPFIND /daca/!svn/bln/117 HTTP/1.1" 207 447 "-" "SVN/1.6.16 (r1073529) neon/0.29.6" "-" 10.23.15.14 - telteron [25/Mar/2012:22:47:45 +0400] "PROPFIND / HTTP/1.1" 207 639 "-" "SVN/1.6.16 (r1073529) neon/0.29.6" "-" 10.23.15.14 - telteron [25/Mar/2012:22:47:45 +0400] "PROPFIND /daca/!svn/vcc/default HTTP/1.1" 207 447 "-" "SVN/1.6.16 (r1073529) neon/0.29.6" "-" 10.23.15.14 - telteron [25/Mar/2012:22:47:45 +0400] "PROPFIND /daca/!svn/bc/117 HTTP/1.1" 207 651 "-" "SVN/1.6.16 (r1073529) neon/0.29.6" "-" 10.23.15.14 - - [25/Mar/2012:22:47:45 +0400] "OPTIONS / HTTP/1.1" 401 546 "-" "SVN/1.6.16 (r1073529) neon/0.29.6" "-" 10.23.15.14 - telteron [25/Mar/2012:22:47:45 +0400] "OPTIONS / HTTP/1.1" 200 184 "-" "SVN/1.6.16 (r1073529) neon/0.29.6" "-" 10.23.15.14 - telteron [25/Mar/2012:22:47:45 +0400] "PROPFIND / HTTP/1.1" 207 639 "-" "SVN/1.6.16 (r1073529) neon/0.29.6" "-" 10.23.15.14 - telteron [25/Mar/2012:22:47:45 +0400] "PROPFIND / HTTP/1.1" 207 639 "-" "SVN/1.6.16 (r1073529) neon/0.29.6" "-" 10.23.15.14 - telteron [25/Mar/2012:22:47:45 +0400] "PROPFIND /daca/!svn/vcc/default HTTP/1.1" 207 392 "-" "SVN/1.6.16 (r1073529) neon/0.29.6" "-" 10.23.15.14 - telteron [25/Mar/2012:22:47:45 +0400] "PROPFIND /daca/!svn/bln/117 HTTP/1.1" 207 447 "-" "SVN/1.6.16 (r1073529) neon/0.29.6" "-" 10.23.15.14 - telteron [25/Mar/2012:22:47:45 +0400] "PROPFIND / HTTP/1.1" 207 639 "-" "SVN/1.6.16 (r1073529) neon/0.29.6" "-" 10.23.15.14 - telteron [25/Mar/2012:22:47:45 +0400] "PROPFIND /daca/!svn/vcc/default HTTP/1.1" 207 392 "-" "SVN/1.6.16 (r1073529) neon/0.29.6" "-" 10.23.15.14 - telteron [25/Mar/2012:22:47:45 +0400] "PROPFIND /daca/!svn/bln/117 HTTP/1.1" 207 447 "-" "SVN/1.6.16 (r1073529) neon/0.29.6" "-" 10.23.15.14 - telteron [25/Mar/2012:22:47:45 +0400] "REPORT /daca/!svn/vcc/default HTTP/1.1" 500 246 "-" "SVN/1.6.16 (r1073529) neon/0.29.6" "-"

Error.log у Nginx пустой.

В то же самое время апдейт и комит.

svn update
10.23.15.14 - - [25/Mar/2012:22:59:58 +0400] "OPTIONS / HTTP/1.1" 401 546 "-" "SVN/1.6.16 (r1073529) neon/0.29.6" "-" 10.23.15.14 - telteron [25/Mar/2012:23:00:01 +0400] "OPTIONS / HTTP/1.1" 200 184 "-" "SVN/1.6.16 (r1073529) neon/0.29.6" "-" 10.23.15.14 - telteron [25/Mar/2012:23:00:01 +0400] "PROPFIND / HTTP/1.1" 207 639 "-" "SVN/1.6.16 (r1073529) neon/0.29.6" "-" 10.23.15.14 - telteron [25/Mar/2012:23:00:01 +0400] "PROPFIND / HTTP/1.1" 207 639 "-" "SVN/1.6.16 (r1073529) neon/0.29.6" "-" 10.23.15.14 - telteron [25/Mar/2012:23:00:01 +0400] "PROPFIND /daca/!svn/vcc/default HTTP/1.1" 207 392 "-" "SVN/1.6.16 (r1073529) neon/0.29.6" "-" 10.23.15.14 - telteron [25/Mar/2012:23:00:01 +0400] "PROPFIND /daca/!svn/bln/117 HTTP/1.1" 207 447 "-" "SVN/1.6.16 (r1073529) neon/0.29.6" "-" 10.23.15.14 - telteron [25/Mar/2012:23:00:01 +0400] "REPORT /daca/!svn/vcc/default HTTP/1.1" 500 246 "-" "SVN/1.6.16 (r1073529) neon/0.29.6" "-"

в error.log у апача
[Sun Mar 25 23:00:01 2012] [error] [client 10.23.15.15] Could not parse 'src-path' URL. [500, #190001] [Sun Mar 25 23:00:01 2012] [error] [client 10.23.15.15] Unusable URI: it does not refer to this repository [500, #190001]

svn commit
10.23.15.14 - - [25/Mar/2012:23:00:45 +0400] "OPTIONS / HTTP/1.1" 401 546 "-" "SVN/1.6.16 (r1073529) neon/0.29.6" "-" 10.23.15.14 - telteron [25/Mar/2012:23:00:49 +0400] "OPTIONS / HTTP/1.1" 200 184 "-" "SVN/1.6.16 (r1073529) neon/0.29.6" "-" 10.23.15.14 - telteron [25/Mar/2012:23:00:49 +0400] "PROPFIND / HTTP/1.1" 207 639 "-" "SVN/1.6.16 (r1073529) neon/0.29.6" "-" 10.23.15.14 - telteron [25/Mar/2012:23:00:49 +0400] "MKACTIVITY /daca/!svn/act/f4afef19-ad76-e111-85d9-00259004286c HTTP/1.1" 403 402 "-" "SVN/1.6.16 (r1
073529) neon/0.29.6" "-"

в error.log у апача
[Sun Mar 25 23:00:49 2012] [error] [client 10.23.15.15] <DAV:activity-location-ok/> [403, #0]


В то же самое время

svn checkout http://daca.svn.host.ru:8000/daca/ ./
Authentication realm: <http://daca.svn.host.ru:8000> DACA
Password for 'telteron':
...
Checked out revision 117.

10.23.15.14 - - [25/Mar/2012:23:10:42 +0400] "OPTIONS /daca HTTP/1.1" 401 548 10.23.15.14 - telteron [25/Mar/2012:23:10:46 +0400] "OPTIONS /daca HTTP/1.1" 200 184 10.23.15.14 - telteron [25/Mar/2012:23:10:46 +0400] "PROPFIND /daca HTTP/1.1" 207 639 10.23.15.14 - telteron [25/Mar/2012:23:10:46 +0400] "PROPFIND /daca/!svn/vcc/default HTTP/1.1" 207 392 10.23.15.14 - telteron [25/Mar/2012:23:10:46 +0400] "PROPFIND /daca/!svn/bln/117 HTTP/1.1" 207 447 10.23.15.14 - telteron [25/Mar/2012:23:10:46 +0400] "PROPFIND /daca HTTP/1.1" 207 639 10.23.15.14 - telteron [25/Mar/2012:23:10:46 +0400] "PROPFIND /daca/!svn/vcc/default HTTP/1.1" 207 392 10.23.15.14 - telteron [25/Mar/2012:23:10:46 +0400] "PROPFIND /daca/!svn/bln/117 HTTP/1.1" 207 447 10.23.15.14 - telteron [25/Mar/2012:23:10:46 +0400] "PROPFIND /daca HTTP/1.1" 207 639 10.23.15.14 - telteron [25/Mar/2012:23:10:46 +0400] "PROPFIND /daca/!svn/vcc/default HTTP/1.1" 207 447 10.23.15.14 - telteron [25/Mar/2012:23:10:46 +0400] "PROPFIND /daca/!svn/bc/117 HTTP/1.1" 207 651 10.23.15.14 - - [25/Mar/2012:23:10:46 +0400] "OPTIONS /daca HTTP/1.1" 401 548 10.23.15.14 - telteron [25/Mar/2012:23:10:46 +0400] "OPTIONS /daca HTTP/1.1" 200 184 10.23.15.14 - telteron [25/Mar/2012:23:10:46 +0400] "PROPFIND /daca HTTP/1.1" 207 639 10.23.15.14 - telteron [25/Mar/2012:23:10:46 +0400] "PROPFIND /daca HTTP/1.1" 207 639 10.23.15.14 - telteron [25/Mar/2012:23:10:46 +0400] "PROPFIND /daca/!svn/vcc/default HTTP/1.1" 207 392 10.23.15.14 - telteron [25/Mar/2012:23:10:46 +0400] "PROPFIND /daca/!svn/bln/117 HTTP/1.1" 207 447 10.23.15.14 - telteron [25/Mar/2012:23:10:46 +0400] "PROPFIND /daca HTTP/1.1" 207 639 10.23.15.14 - telteron [25/Mar/2012:23:10:46 +0400] "PROPFIND /daca/!svn/vcc/default HTTP/1.1" 207 392 10.23.15.14 - telteron [25/Mar/2012:23:10:46 +0400] "PROPFIND /daca/!svn/bln/117 HTTP/1.1" 207 447 10.23.15.14 - telteron [25/Mar/2012:23:10:46 +0400] "REPORT /daca/!svn/vcc/default HTTP/1.1" 200 39889

И как видим в результате код 200, вместо 500.


_______________________________________________
nginx-ru mailing list
nginx-ru@xxxxxxxxx
http://mailman.nginx.org/mailman/listinfo/nginx-ru


 




Copyright © Lexa Software, 1996-2009.