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

Alex Belyanskiy alex.barut на gmail.com
Вс Мар 25 19:22:23 UTC 2012


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