I am encountering an issue that drives me mad. I installed from scratch an ubuntu 14.04 machine, installed a LAMP stack and subversion. I created a new folder /var/www/svn and imported my various SVN dumps. Made sure they all were set in the svnserve.conf file to be accessible via svn:// and made as well sure that there's a user in the passwd file for me to access it. I added myself and the www-data user to that directory to make sure it is available in the internet. To not bother with too much attributes I started the svnserve with the following command svnserve -d.

I then went on to add to my 000-default.conf an alias Alias /svn /var/www/svn, restarted the apache2 service and it worked like a charm in the browser.

Now to my actual problem when I am trying to access the repo with tortoisesvn I get the error message that there's no svn at that location. After spending quite a while researching I see somebody mention that he was able to access it when using the 'full' path. So I tried the following svn://mydomain.com/var/www/svnand it works...

As the alias works in a browser, but doesn't in a SVN client I am totally flabbergasted.

Any ideas?

To summarize: I am using www.example.com/svn/myrepo when it doesn't work, and when I am using www.example.com/var/www/svn/myrepo then it works.

Full 000-default.conf:

<VirtualHost *:80>
    ServerName www.example.com
    ServerAlias example.com

    ServerAdmin my-email@example.com
    DocumentRoot /var/www/html

    <Directory />
            Options FollowSymLinks
            AllowOverride All

    <Directory /var/www/html/>
            AllowOverride All
            Order allow,deny
            allow from all

    Alias /svn /var/www/svn

    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined

Output of apachectl -S

VirtualHost configuration:*:80 www.example.com (/etc/apache2/sites-enabled/000-default.conf:1) ServerRoot: "/etc/apache2" Main DocumentRoot: "/var/www" Main ErrorLog: "/var/log/apache2/error.log" Mutex default: dir="/var/lock/apache2" mechanism=fcntl Mutex mpm-accept: using_defaults Mutex watchdog-callback: using_defaults Mutex rewrite-map: using_defaults PidFile: "/var/run/apache2/apache2.pid" Define: DUMP_VHOSTS Define: DUMP_RUN_CFG User: name="www-data" id=33 not_used Group: name="www-data" id=33 not_used

  • What URL are you using to access the repo from the SVN client when it's not working? – Shane Madden Oct 9 '14 at 6:48
  • I am using www.example.com/svn/myrepo when it doesn't work, and I am using www.example.com/var/www/svn/myrepo when it works. – sogathon Oct 9 '14 at 6:49
  • www.example.com/var/www/svn/myrepo works? Your docroot is /var/www/html not /, and that doesn't match an alias, so it shouldn't work - that would be looking for a file at /var/www/html/var/www/svn/myrepo. Is there other config involved? What's the output of apachectl -S? – Shane Madden Oct 9 '14 at 6:53
  • Added apachectl -S output to original question. Thanks for helping! – sogathon Oct 9 '14 at 6:58
  • So, any other config involved? /var/www/html/var/www/svn/myrepo shouldn't work, so unless that path exists or you have more aliases somewhere (....htaccess?), something doesn't add up. – Shane Madden Oct 9 '14 at 7:00

The apache config file is only used when you access the repository using http or https. When you're using svn, the connection is handled by svnserve which is an entirely separate program.

The documentation for svnserve is available at the SVN book or the man page man svnserve and man svnserve.conf. You can set the root path when you invoke it, like so:

svnserve -r /var/www

to make it start looking for files and repos under /var/www instead of immediately under /.

| improve this answer | |
  • 1
    absolutely correct... I am a flaming moron to mix that up. Thanks! – sogathon Oct 9 '14 at 7:26
  • heh, bonus point for noticing the flames and putting them out though :-) – Jenny D Oct 9 '14 at 7:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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