Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

share|improve this question
    
does the svn format file exist? if yes, where is it located? –  Daniel t. Feb 1 '13 at 16:00
    
yes svn format file is already in /var/www/svn/project1/format –  hsgu Feb 1 '13 at 16:11
    
why do you have SVNPath /var/www/svn/REPOSITORY_NAME instead of /var/www/svn/project1/ ? –  Daniel t. Feb 1 '13 at 16:15
    
my repository should depend on url ex. svn.mydomain.com/project2 –  hsgu Feb 1 '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 1 '13 at 17:35
show 3 more comments

1 Answer

up vote 1 down vote accepted

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:

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.