3

My repository directory is /var/www/svn and access file is /var/www/svn-auth and I create repository project1 in svn directory

My configuration

svn.mydomain.com.conf

<VirtualHost 127.0.0.1:8080>
    ServerName svn.mydomain.com
    <Location />
        DAV svn
        SVNPath /var/www/svn/REPOSITORY_NAME
        AuthType Basic
        AuthName "Subversion repositories"
        AuthUserFile /var/www/svn-auth/passwd
        Require valid-user
    </Location>
</VirtualHost>

some modification httpd.conf

Listen 8080
DocumentRoot "/var/www/"
<Directory "/var/www">

nginx svn.mydomain.com.conf

server {
    server_name svn.mydomain.com;       
    location / {            
        proxy_pass   http://127.0.0.1:8080;
    }   
}

I can login but cannot access file It say file not found like this error_log

[Fri Feb 01 10:06:44 2013] [error] [client 115.87.26.145] (20014)Internal error: Can't open file '/var/www/svn/REPOSITORY_NAME/format': No such file or directory
[Fri Feb 01 10:06:44 2013] [error] [client 115.87.26.145] Could not fetch resource information.  [500, #0]
[Fri Feb 01 10:06:44 2013] [error] [client 115.87.26.145] Could not open the requested SVN filesystem  [500, #2]
[Fri Feb 01 10:06:44 2013] [error] [client 115.87.26.145] Could not open the requested SVN filesystem  [500, #2]
[Fri Feb 01 10:06:45 2013] [error] [client 115.87.26.145] File does not exist: /var/www/favicon.ico

then I try change SVNPath /var/www/svn/REPOSITORY_NAME to SVNPath /var/www/svn and access svn.mydomain.com/project1 and error_log still show my wrong path

[Fri Feb 01 10:23:28 2013] [error] [client 127.0.0.1] (20014)Internal error: Can't open file '/var/www/svn/format': No such file or directory
[Fri Feb 01 10:23:28 2013] [error] [client 127.0.0.1] Could not fetch resource information.  [500, #0]
[Fri Feb 01 10:23:28 2013] [error] [client 127.0.0.1] Could not open the requested SVN filesystem  [500, #2]
[Fri Feb 01 10:23:28 2013] [error] [client 127.0.0.1] Could not open the requested SVN filesystem  [500, #2]

the right path should be /var/www/svn/project1
not /var/www/svn/ , /var/www/svn/REPOSITORY_NAME

I try use SVNPath /var/www/svn/project1 and this work I can access project1 but if I config like this I can't access another project

Please help!!!! Thank you very much.

hsgu
  • 149
  • 1
  • 2
  • 7
  • does the svn `format` file exist? if yes, where is it located? – Daniel t. Feb 01 '13 at 16:00
  • yes svn `format` file is already in `/var/www/svn/project1/format` – hsgu Feb 01 '13 at 16:11
  • why do you have `SVNPath /var/www/svn/REPOSITORY_NAME` instead of `/var/www/svn/project1/` ? – Daniel t. Feb 01 '13 at 16:15
  • my repository should depend on url ex. svn.mydomain.com/project2 – hsgu Feb 01 '13 at 16:22
  • Have you made sure the filesystem permissions on everything under `/var/www/svn` is set in a way that makes it both readable and writeable by the Apache user? – Zoredache Feb 01 '13 at 17:35
  • I recursive set owner and chmod 611 to apache for svn and svn-auth before I change permission error_log is say permission deny. my early question here http://serverfault.com/questions/474500/cannot-access-any-svn-file Thank you. – hsgu Feb 01 '13 at 18:00
  • As you can login, your configuration seems ok, but did you installed and enabled dav_mod_svn module, as it is required to access SVN filesystem over http. – sundeep Feb 03 '13 at 14:39
  • I try use `SVNPath /var/www/svn/project1` and this work I can access project1 but if I config like this I can't access another project – hsgu Feb 04 '13 at 04:24

1 Answers1

3

OK, short blamestorming for your Apache's config

Your ServerName + Location + SVNPath means now:

For URL http://svn.mydomain.com/ open repository, created at /var/www/svn/REPOSITORY_NAME

If you haven't /var/www/svn/REPOSITORY_NAME directory or repository under this path, you'll get "Can't open file"+"Could not open the requested SVN filesystem" errors

If you want to have access to more than single repository under common base-path (svn.mydomain.com/repository1, svn.mydomain.com/repository2...) and place all repos as subdirs of /var/www/svn/ you have to:

Lazy Badger
  • 3,137
  • 15
  • 13