subversion behind nginx

Александр Кириллов nevis2us at gmail.com
Fri Oct 6 11:16:07 UTC 2017


Hi, I have 2 almost identical vhost definitions:

1. https://svn.iproducts.test

location /repos/ {

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

proxy_set_header Destination $dest;
proxy_pass http://127.0.0.1:80/repos/;
}

2. https://svn-test.iproducts.test

location / {

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

proxy_set_header Destination $dest;
proxy_pass http://127.0.0.1:80/repos/;
}

The first one works and the second one doesn't and I don't understand why.
The only difference is the uri in location. Please advise. Details below.


I'm using the following commands to test the configs:

1. svn list https://svn.iproducts.test/repos/wordpress
branches/
tags/
trunk/
vendor/

2. svn list https://svn-test.iproducts.test/wordpress
...
svn: PROPFIND of '/repos/wordpress/!svn/vcc/default': authorization failed:
Could not authenticate to server: rejected Basic challenge (
https://svn-test.iproducts.test)


In the apache logs the first 3 lines are identical but the second PROPFIND
has '/repos/repos' instead of '/repos' and fails:

==> /var/log/httpd/access_log <==
127.0.0.1 - - [06/Oct/2017:13:43:54 +0300] "OPTIONS /repos/wordpress
HTTP/1.0" 401 460 "-" "SVN/1.6.11 (r934486) neon/0.29.3"
127.0.0.1 - xxxxx [06/Oct/2017:13:43:54 +0300] "OPTIONS /repos/wordpress
HTTP/1.0" 200 195 "-" "SVN/1.6.11 (r934486) neon/0.29.3"
127.0.0.1 - xxxxx [06/Oct/2017:13:43:54 +0300] "PROPFIND /repos/wordpress
HTTP/1.0" 207 661 "-" "SVN/1.6.11 (r934486) neon/0.29.3"

127.0.0.1 - xxxxx [06/Oct/2017:13:43:54 +0300] "PROPFIND
/repos/wordpress/!svn/vcc/default HTTP/1.0" 207 415 "-" "SVN/1.6.11
(r934486) neon/0.29.3"

...

==> /var/log/httpd/access_log <==
127.0.0.1 - - [06/Oct/2017:13:40:49 +0300] "OPTIONS /repos/wordpress
HTTP/1.0" 401 460 "-" "SVN/1.6.11 (r934486) neon/0.29.3"
127.0.0.1 - xxxxx [06/Oct/2017:13:40:52 +0300] "OPTIONS /repos/wordpress
HTTP/1.0" 200 195 "-" "SVN/1.6.11 (r934486) neon/0.29.3"
127.0.0.1 - xxxxx [06/Oct/2017:13:40:52 +0300] "PROPFIND /repos/wordpress
HTTP/1.0" 207 661 "-" "SVN/1.6.11 (r934486) neon/0.29.3"

==> /var/log/httpd/error_log <==
[Fri Oct 06 13:40:52 2017] [error] [client 127.0.0.1] access to
/repos/repos/wordpress/!svn/vcc/default failed, reason: verification of
user id 'xxxxx' not configured

==> /var/log/httpd/access_log <==
127.0.0.1 - xxxxx [06/Oct/2017:13:40:52 +0300] "PROPFIND
/repos/repos/wordpress/!svn/vcc/default HTTP/1.0" 401 460 "-" "SVN/1.6.11
(r934486) neon/0.29.3"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20171006/e0d02928/attachment.html>


More information about the nginx mailing list