Subversion&Trac support

Discussion in 'Feature Requests' started by sinosmond, Oct 28, 2005.

  1. sinosmond

    sinosmond New Member

    How to build ISPConfig to support Subversion&Trac for every user ?

    Hope Subversion&Trac support become a module of ISPConfig.
     
  2. falko

    falko Super Moderator ISPConfig Developer

    You mean you want to create a subversion account for every user?
    What is Trac?
     
  3. sinosmond

    sinosmond New Member

    Yes, like www.csoft.net

    ==============================================
    I think, Subversion support maybe 4 case:

    1. repo at / , one repo

    $ svnadmin create /home/www/web1/web
    ------------------------------------------------------------
    LoadModule dav_module modules/mod_dav.so
    LoadModule dav_svn_module modules/mod_dav_svn.so
    <Location />
    DAV svn
    SVNPath /home/www/web1/web

    AuthType Basic
    AuthName "Subversion repository"
    AuthUserFile /home/www/web1/.htpasswd

    <LimitExcept GET PROPFIND OPTIONS REPORT>
    SSLRequireSSL
    Require valid-user
    </LimitExcept>
    </Location>

    2. repos at / , multi repos

    $ svnadmin create /home/www/web1/web/project1
    $ svnadmin create /home/www/web1/web/project2
    ------------------------------------------------------------
    LoadModule dav_module modules/mod_dav.so
    LoadModule dav_svn_module modules/mod_dav_svn.so
    <Location />
    DAV svn
    SVNParentPath /home/www/web1/web

    AuthType Basic
    AuthName "Subversion repository"
    AuthUserFile /home/www/web1/.htpasswd

    <LimitExcept GET PROPFIND OPTIONS REPORT>
    SSLRequireSSL
    Require valid-user
    </LimitExcept>
    </Location>

    3. repo at /svn , one repo

    $ svnadmin create /home/www/web1/web/svn
    ------------------------------------------------------------
    LoadModule dav_module modules/mod_dav.so
    LoadModule dav_svn_module modules/mod_dav_svn.so
    <Location /svn>
    DAV svn
    SVNPath /home/www/web1/web/svn

    AuthType Basic
    AuthName "Subversion repository"
    AuthUserFile /home/www/web1/.htpasswd

    <LimitExcept GET PROPFIND OPTIONS REPORT>
    SSLRequireSSL
    Require valid-user
    </LimitExcept>
    </Location>

    4. repos at /svn , multi repos

    $ svnadmin create /home/www/web1/web/svn/project1
    $ svnadmin create /home/www/web1/web/svn/project2
    ------------------------------------------------------------
    LoadModule dav_module modules/mod_dav.so
    LoadModule dav_svn_module modules/mod_dav_svn.so
    <Location /svn>
    DAV svn
    SVNParentPath /home/www/web1/web/svn

    AuthType Basic
    AuthName "Subversion repository"
    AuthUserFile /home/www/web1/.htpasswd

    <LimitExcept GET PROPFIND OPTIONS REPORT>
    SSLRequireSSL
    Require valid-user
    </LimitExcept>
    </Location>
    ------------------------------------------------------------

    maybe more...


    Trac Project
     
    Last edited: Oct 29, 2005
  4. Spum

    Spum ISPConfig Developer ISPConfig Developer

    Err, it's kinda like SVN or CVS.. But, what is the point, most users wont even know what it is :-/
     
  5. sinosmond

    sinosmond New Member

    I want service some developers , vhost should support svn or cvs .

    at least, I can add snippet which can't delete by ISPConfig in Vhost.conf .
     
  6. xinman

    xinman New Member

    Currently I have a working ISPConfig server setup. I was reading your post about SVN. I use my ISPConfig primarily for testing webapps, etc... it's not really a production system. I would like to implement SVN, as I am no longer able to SFTP into my box from work. I have diffrent subdomains for every project that I do. I would like each to have a repos. Not automagically, I am willing to create the repos as needed (some will not need it). I was looking at
    Code:
    2. repos at / , multi repos
    
    $ svnadmin create /home/www/web1/web/project1
    $ svnadmin create /home/www/web1/web/project2
    ------------------------------------------------------------
    LoadModule dav_module modules/mod_dav.so
    LoadModule dav_svn_module modules/mod_dav_svn.so
    <Location />
    DAV svn
    SVNParentPath /home/www/web1/web
    
    AuthType Basic
    AuthName "Subversion repository"
    AuthUserFile /home/www/web1/.htpasswd
    
    <LimitExcept GET PROPFIND OPTIONS REPORT>
    SSLRequireSSL
    Require valid-user
    </LimitExcept>
    </Location>
    I believe this is what I want, but I need to know, did you get this implementation working, or do you see any reason why it shouldn't. Can you also tell me where exactly I need to put the conf info
    Code:
    LoadModule dav_module modules/mod_dav.so
    LoadModule dav_svn_module modules/mod_dav_svn.so
    <Location />
    DAV svn
    SVNParentPath /home/www/web1/web
    
    AuthType Basic
    AuthName "Subversion repository"
    AuthUserFile /home/www/web1/.htpasswd
    
    <LimitExcept GET PROPFIND OPTIONS REPORT>
    SSLRequireSSL
    Require valid-user
    </LimitExcept>
    </Location>
    Does it go in the apache directives?
     
  7. till

    till Super Moderator Staff Member ISPConfig Developer

    I think the loadmodule directives should go directly in your httpd.conf.

    The other directives should be put i the apache directives field of the website in ISPConfig.
     
  8. d0nut

    d0nut New Member

    great stuff.. in the browser it works fine
    i configured ssl over ispconfig, added the code in apache directives (over ispconfig) and everything was ok

    but when i try a checkout, i always get a 301 error message

    svn: PROPFIND Anfrage fehlgeschlagen auf '/svn/projekt'
    svn: PROPFIND von '/svn/projekt': 301 Moved Permanently

    this concers the "DocumentRoot"-Problem
    -> http://subversion.tigris.org/faq.html#301-error

    but how to solve? how to make this directories not to overlap?
     
  9. falko

    falko Super Moderator ISPConfig Developer

    Does this apply to your situation?

    Can you post your SVN Apache vhost configuration here?
     
  10. d0nut

    d0nut New Member

    hi falko
    this is the full entry from Vhosts_ispconfig.conf
    The SVN Path overlaps the DocumentRoot
    The problem is clear - but why did it work for the users above

    I just reread the text - So this text from the FAQ would fit, if i would have a folder named /svn in the linux root filesystem.
    that's not the case

    but now i have complety no idea, what to do

    Code:
    <VirtualHost 88.198.215.155:80>
    LoadModule dav_module modules/mod_dav.so
    LoadModule dav_svn_module modules/mod_dav_svn.so
    <Location /svn>
     DAV svn
     SVNParentPath /var/www/svn.easy-coding.de/web/svn
     AuthType Basic
     AuthName 'Subversion repository'
     AuthUserFile /var/www/svn.easy-coding.de/web/svn/.htpasswd
    # <LimitExcept GET PROPFIND OPTIONS REPORT>
     SSLRequireSSL
     Require valid-user
    # </LimitExcept>
    </Location>
    <Location /svn/projekt>
     AuthUserFile /var/www/svn.easy-coding.de/web/svn/projekt/.htpasswd
    </Location>
    <Location /svn/projekt2>
     AuthUserFile /var/www/svn.easy-coding.de/web/svn/projekt2/.htpasswd
    </Location>
    SuexecUserGroup nobody web33
    ServerName svn.easy-coding.de:80
    ServerAdmin [email protected]
    DocumentRoot /var/www/web33/web
    DirectoryIndex index.html index.htm index.php index.php5 index.php4 index.php3 index.shtml index.cgi index.pl index.jsp Default.htm default.htm
    ErrorLog /var/www/web33/log/error.log
    Alias /error/ "/var/www/web33/web/error/"
    ErrorDocument 400 /error/invalidSyntax.html
    ErrorDocument 401 /error/authorizationRequired.html
    ErrorDocument 403 /error/forbidden.html
    ErrorDocument 404 /error/fileNotFound.html
    ErrorDocument 405 /error/methodNotAllowed.html
    ErrorDocument 500 /error/internalServerError.html
    ErrorDocument 503 /error/overloaded.html
    AliasMatch ^/~([^/]+)(/(.*))? /var/www/web33/user/$1/web/$3
    AliasMatch ^/users/([^/]+)(/(.*))? /var/www/web33/user/$1/web/$3
    </VirtualHost>
     
    Last edited: Oct 22, 2006
  11. falko

    falko Super Moderator ISPConfig Developer

    I think you must place this:

    Code:
    LoadModule dav_module modules/mod_dav.so
    LoadModule dav_svn_module modules/mod_dav_svn.so
    <Location /svn>
     DAV svn
     SVNParentPath /var/www/svn.easy-coding.de/web/svn
     AuthType Basic
     AuthName 'Subversion repository'
     AuthUserFile /var/www/svn.easy-coding.de/web/svn/.htpasswd
    # <LimitExcept GET PROPFIND OPTIONS REPORT>
     SSLRequireSSL
     Require valid-user
    # </LimitExcept>
    </Location>
    <Location /svn/projekt>
     AuthUserFile /var/www/svn.easy-coding.de/web/svn/projekt/.htpasswd
    </Location>
    <Location /svn/projekt2>
     AuthUserFile /var/www/svn.easy-coding.de/web/svn/projekt2/.htpasswd
    </Location>
    in your main Apache configuration, outside any vhost.
     
  12. d0nut

    d0nut New Member

    same problem :-(
    (of course i checked it after restarting apache)

    on thursday i meet another guy who is more experienced in subversion than me
    i will ask him, if he has any idea..

    when i get a solution/or get no solution i will post here later this week
     
  13. d0nut

    d0nut New Member

    i got it :-D
    so the DocumentRoot has to Differ from svnroot
    the example from site1 should not have worked!

    This works:
    <Location />
    DAV svn
    SVNParentPath /var/www/www.projekt.de/web/svn
    </Location>

    This does not work:
    <Location /svn>
    DAV svn
    SVNParentPath /var/www/www.projekt.de/web/svn
    </Location>
     
  14. jacobhenry

    jacobhenry New Member

    I have followed this post and continue to get

    Code:
    svn: PROPFIND request failed on '/'
    svn: PROPFIND of '/': 403 Forbidden (http://svn.scratchco.com)
    
    These are the steps I have taken to this point

    1) installed subversion

    Code:
    apt-get install subversion subversion-tools
    
    2) enable subversion within apache 2
    Code:
    a2enmod dav-svn
    
    I did it this way instead of placing the following code into the httpd.conf file
    Code:
    LoadModule dav_module modules/mod_dav.so
    LoadModule dav_svn_module modules/mod_dav_svn.so
    
    3)Populated the Apache Directives with

    Code:
    <Location />
    DAV svn
    SVNParentPath /var/www/web7/web/svn
    
    AuthType Basic
    AuthName 'Subversion repository'
    AuthUserFile /var/www/web7/.htpasswd
    
    <LimitExcept GET PROPFIND OPTIONS REPORT>
    SSLRequireSSL
    Require valid-user
    </LimitExcept>
    </Location>
    
    4) Test and get error message

    Do you have any suggestions. From what i understand Apache is doing its job and not letting anyone access the files. What am I missing to override that protection?

    Thanks
    Jacob Henry
     
  15. NETabuse

    NETabuse ISPConfig Developer ISPConfig Developer

    Have you removed the LimitExcept block and tried it without? make sure you an get it working without protection first to make sure svn will work at all,, then worry about adding features. The fact that you used the a2enmod command should still work from what i understand, but maybe try adding the apache directives by hand to make sure.

    let me know if it works ;) i'm quite interested in this idea.
     
  16. d0nut

    d0nut New Member

    yeah.. everything step by step ;-)
    before you try to use the subversion client - just call the url in your favourite browser. which site is shown? any error messages?

    what does your logiles say? /var/www/web7/log/error.log

    btw: i wrote a bashscript for creating trac and subversion files.
    not very complicated: http://torben.bloggt.biz/howto-subversion-trac-hosting
     
  17. jacobhenry

    jacobhenry New Member

    Now, when I try to connect to http://svn.scratchco.com/svn/ I get:

    Code:
    svn: PROPFIND request failed on '/svn'
    svn: PROPFIND of '/svn': 301 Moved Permanently (http://svn.scratchco.com)
    
    and when i try to connect to http://svn.scratchco.com I get
    Code:
    svn: PROPFIND request failed on '/'
    svn: Could not open the requested SVN filesystem
    
    My Apache Directives now looks like:

    Code:
    <Location />
    DAV svn
    SVNParentPath /var/www/svn.scratchco.com/web/svn
    
    #AuthType Basic
    #AuthName 'Subversion repository'
    #AuthUserFile /var/www/svn.scratchco.com/.htpasswd2
    
    #<LimitExcept GET PROPFIND OPTIONS REPORT>
    #SSLRequireSSL
    #Require valid-user
    #</LimitExcept>
    </Location>
    
     
  18. d0nut

    d0nut New Member

    did you create a project???

    svnadmin create /var/www/svn.scratchco.com/web/svn/

    or the following if you want to create more projects
    svnadmin create /var/www/svn.scratchco.com/web/svn/pro1
    svnadmin create /var/www/svn.scratchco.com/web/svn/pro2
    svnadmin create /var/www/svn.scratchco.com/web/svn/pro3
     
    Last edited: Feb 14, 2007
  19. jacobhenry

    jacobhenry New Member

    I created a project and gave apache permissions. I will try to be as detailed as possible.

    Here is my Apache Directive:

    Code:
    <Location />
    DAV svn
    SVNParentPath /var/www/svn.scratchco.com/web/svn
    </Location>
    
    1)I created a project using

    Code:
    svnadmin create /var/www/svn.scratchco.com/web/svn/
    
    and here is the directory

    Code:
    root@server1:/var/www/web7/web# ls /var/www/svn.scratchco.com/web/svn/
    conf  dav  db  format  hooks  locks  README.txt
    
    2)I gave permission to Apache

    Code:
    chown -R www-data.www-data /var/www/svn.scratchco.com/web/svn/
    
    3)When I explore to http://svn.scratchco.com/svn/ in internet explorer I get an HTTP 500 Internal Error
    4)Firefox gives me this:

    Code:
    −<D:error>
    <C:error/>
    <m:human-readable errcode="2">
    Could not open the requested SVN filesystem
    </m:human-readable>
    </D:error>
    
    5) I believe my error log shows the problem, but I am not sure how to fix it.

    Code:
    
    [Wed Feb 14 13:20:58 2007] [error] (20014)Error string not specified yet: Can't open file '/var/www/svn.scratchco.com/web[b]/svn/svn/[/b]format': No such file or directory
    [Wed Feb 14 13:20:58 2007] [error] Could not fetch resource information.  [500, #0]
    [Wed Feb 14 13:20:58 2007] [error] Could not open the requested SVN filesystem  [500, #2]
    [Wed Feb 14 13:20:58 2007] [error] Could not open the requested SVN filesystem  [500, #2]
    
    why is another svn directory in the path?

    6)I tried shortening my path within the apache directive to
    Code:
    SVNParentPath /var/www/svn.scratchco.com/web
    
    which finally displayed something on the browser but still did not let me connect using my client (eclipse). This method also presented me with the same problem discussed earlier in the topic.

    I will continue to search for the solution. I appreciate all you help so far.

    Thanks,
    Jacob
     
  20. d0nut

    d0nut New Member

    sorry - no idea at the moment..
    just a little hint. you don't have to test both cases.
    when you use this code
    <Location />
    DAV svn
    SVNParentPath /var/www/www.projekt.de/web/svn
    </Location>

    ...then you have to call www.projekt.de in the browser - without the svn folder.
     

Share This Page