Page 1 of 4 123 ... LastLast
Results 1 to 10 of 33

Thread: HOWTO - Apache2 + Subversion + SSL

  1. #1
    Join Date
    Jul 2005
    Beans
    34

    HOWTO - Apache2 + Subversion + SSL

    I needed install Apache2 + Subversion and i have searching for info, etc. and now i'm decide to create this tutorial, i hope you like!

    Here we go:

    INSTALL APACHE2

    To install apache2 run that command:
    Code:
    sudo apt-get install apache2
    (if you want also install php and mysql just follow this Link)

    After you will install subversion:
    Code:
    sudo apt-get install subversion
    (in that moment doens't exist the pre-buil binary of the last version (1.2.1), but when it's out you can simple upgrade )

    To use svn with apache you need install libapache2-svn:
    Code:
    sudo apt-get install libapache2-svn
    Now is better restart apache :
    Code:
    sudo /etc/init.d/apache2 restart
    If you don't want SSL go to the last instructions (dav_svn.conf configurations, and users accounts).

    Run:
    Code:
    a2enmod ssl
    Add "Listen 443" to /etc/apache2/ports.conf:
    Code:
    sudo gedit /etc/apache2/ports.conf
    Run:
    Code:
    apache2-ssl-certificate
    Create a new SSL configuration file:
    Code:
    sudo cp /etc/apache2/sites-available/default /etc/apache2/sites-available/myown-ssl
    Edit myown-ssl file:
    Code:
    sudo gedit /etc/apache2/sites-available/myown-ssl
    Change:
    Code:
    NameVirtualHost *
    to
    Code:
    NameVirtualHost *:443
    and
    Code:
    <VirtualHost *>
    to
    Code:
    <VirtualHost *:443>
    Add before </VirtualHost>:
    Code:
    SSLEngine on
    SSLCertificateFile /etc/apache2/ssl/apache.pem
    SSLProtocol all
    SSLCipherSuite HIGH:MEDIUM
    Run:
    Code:
    a2ensite myown-ssl
    Restart Apache:
    Code:
    sudo /etc/init.d/apache2 restart
    Last instruction:

    Edit dav_svn configuration file and follow the instructions:
    Code:
    sudo gedit /etc/apache2/mods-available/dav_svn.conf
    Restart apache:
    Code:
     sudo /etc/init.d/apache2 restart
    Create SVN folder:
    Code:
    sudo svnadmin create /srv/svn
    sudo chown -R www-data:www-data /srv/svn
    sudo chmod -R g+ws /srv/svn
    Create the users account file:
    Code:
    sudo htpasswd2 -c /etc/apache2/dav_svn.passwd svnuser
    (after asks for a password)

    Test SVN:
    Code:
    svn import .bashrc https://localhost/svn/testfile -mlogentry
    That is all!!!


    For the SSL instructions i have follow this Tutorial.
    About how using SVN see the official SVN book here or visit the official website (Link).

    Any error, please report! (and not only in the istructions but also in the english...)

  2. #2
    Join Date
    May 2005
    Location
    Stuttgart
    Beans
    54

    Re: HOWTO - Apache2 + Subversion + SSL

    Nice. Finally got SVN with Apache to work...
    But there're some mistakes. The dav_svn.passwd file should be in /etc/apache2/mods-available, right? At least, that's where I put it.
    And I needed to run the following commands as root:
    a2enmod ssl
    apache2-ssl-certificate
    a2ensite myown-ssl

  3. #3
    Join Date
    Jul 2005
    Beans
    34

    Re: HOWTO - Apache2 + Subversion + SSL

    I said to create dav_svn.passwd file in /etc/apache2/ folder

    Code:
    sudo htpasswd2 -c /etc/apache2/dav_svn.passwd svnuser
    if you have create that file in that place you can remove and create a new file but in the correct location.

    Observation: I think isn't there problem if you create there...
    If you look at file /etc/apache2/mods-available/dav_svn.conf, you will see that "AuthUserFile /etc/apache2/dav_svn.passwd", so if you change and want use Authentication you must change that.

  4. #4
    Join Date
    Aug 2005
    Beans
    1

    Re: HOWTO - Apache2 + Subversion + SSL

    Hey all, great tutorial but I've come across a small problem and not sure where the error lies. Followed the everything and seemed fine until I tried to test it.
    Code:
    svn import .bashrc https://localhost/svn/testfile -mlogentry
    I tried this and come up with this error.
    Code:
    svn: PROPFIND request failed on '/svn/testfile'
    svn: PROPFIND of '/svn/testfile': 403 Forbidden (https://localhost)
    I'm guessing its a permissions problem but not sure if its apache or svn. Any help?

  5. #5
    Join Date
    Aug 2005
    Beans
    78

    Re: HOWTO - Apache2 + Subversion + SSL

    where is libapache2-svn ?

    Code:
    sudo apt-get install libapache2-svn
    Reading package lists... Done
    Building dependency tree... Done
    E: Couldn't find package libapache2-svn

  6. #6
    Join Date
    Aug 2005
    Beans
    78

    Talking Re: HOWTO - Apache2 + Subversion + SSL

    Quote Originally Posted by mariuz
    where is libapache2-svn ?

    Code:
    sudo apt-get install libapache2-svn
    Reading package lists... Done
    Building dependency tree... Done
    E: Couldn't find package libapache2-svn
    fixed is in universe
    after i added in "/etc/apt/sources.list"
    Code:
    deb http://ro.archive.ubuntu.com/ubuntu hoary universe
    deb-src http://ro.archive.ubuntu.com/ubuntu hoary universe
    it worked

  7. #7
    Join Date
    Dec 2004
    Beans
    18

    Re: HOWTO - Apache2 + Subversion + SSL

    Thanks for the great howto. It worked perfectly!

    I have a question though... I want to have my svn repository as a Virtual Host with no connection to my other sites. Basically I want the URL http://svn.mydomain.com go directly to the svn repository, while http://mydomain.com goes to a normal website. My problem is, I have attempted to set it up, but no matter what I do, when I try and go to the normal website it goes the the repository. Could you give me an example of the setup that I need?

    Also as a note, I don't want to have the /svn directory at the end of the URL as it seems messy and redundant and I don't want http://mydomain.com/svn to reference the repo either.

    Thanks
    Simon

  8. #8
    Join Date
    Nov 2005
    Location
    Amsterdam
    Beans
    20
    Distro
    Ubuntu Breezy 5.10

    Unhappy Re: HOWTO - Apache2 + Subversion + SSL

    <moved>
    Last edited by Vegettex; January 31st, 2006 at 03:01 PM.

  9. #9
    Join Date
    May 2006
    Beans
    9

    Re: HOWTO - Apache2 + Subversion + SSL

    Quote Originally Posted by Sniper PT
    I needed install Apache2 + Subversion and i have searching for info, etc. and now i'm decide to create this tutorial, i hope you like!

    Here we go:

    INSTALL APACHE2

    To install apache2 run that command:
    Code:
    sudo apt-get install apache2
    (if you want also install php and mysql just follow this Link)

    After you will install subversion:
    Code:
    sudo apt-get install subversion
    (in that moment doens't exist the pre-buil binary of the last version (1.2.1), but when it's out you can simple upgrade )

    To use svn with apache you need install libapache2-svn:
    Code:
    sudo apt-get install libapache2-svn
    Now is better restart apache :
    Code:
    sudo /etc/init.d/apache2 restart
    If you don't want SSL go to the last instructions (dav_svn.conf configurations, and users accounts).

    Run:
    Code:
    a2enmod ssl
    Add "Listen 443" to /etc/apache2/ports.conf:
    Code:
    sudo gedit /etc/apache2/ports.conf
    Run:
    Code:
    apache2-ssl-certificate
    Create a new SSL configuration file:
    Code:
    sudo cp /etc/apache2/sites-available/default /etc/apache2/sites-available/myown-ssl
    Edit myown-ssl file:
    Code:
    sudo gedit /etc/apache2/sites-available/myown-ssl
    Change:
    Code:
    NameVirtualHost *
    to
    Code:
    NameVirtualHost *:443
    and
    Code:
    <VirtualHost *>
    to
    Code:
    <VirtualHost *:443>
    Add before </VirtualHost>:
    Code:
    SSLEngine on
    SSLCertificateFile /etc/apache2/ssl/apache.pem
    SSLProtocol all
    SSLCipherSuite HIGH:MEDIUM
    Run:
    Code:
    a2ensite myown-ssl
    Restart Apache:
    Code:
    sudo /etc/init.d/apache2 restart
    Last instruction:

    Edit dav_svn configuration file and follow the instructions:
    Code:
    sudo gedit /etc/apache2/mods-available/dav_svn.conf
    Restart apache:
    Code:
     sudo /etc/init.d/apache2 restart
    Create SVN folder:
    Code:
    sudo svnadmin create /srv/svn
    sudo chown -R www-data:www-data /srv/svn
    sudo chmod -R g+ws /srv/svn
    Create the users account file:
    Code:
    sudo htpasswd2 -c /etc/apache2/dav_svn.passwd svnuser
    (after asks for a password)

    Test SVN:
    Code:
    svn import .bashrc https://localhost/svn/testfile -mlogentry
    That is all!!!


    For the SSL instructions i have follow this Tutorial.
    About how using SVN see the official SVN book here or visit the official website (Link).

    Any error, please report! (and not only in the istructions but also in the english...)
    Hi, I follow your steps above. But everythime I try to access my repository I am getting the following error:
    svn: PROPFIND request failed on '/svn/testfile'
    svn: Could not open the requested SVN filesystem

    Thanks.

  10. #10
    Join Date
    Aug 2005
    Beans
    21

    Re: HOWTO - Apache2 + Subversion + SSL

    When I pull up http://localhost/svn I can see that it looks like the install went fine, but when I try to run this command:

    Code:
    svn import .bashrc https://localhost/svn/testfile -mlogentry
    I get the following:

    Code:
    root@alibaba:~# svn import .bashrc http://localhost/svn/testfile -mlogentry
    svn: PROPFIND request failed on '/svn'
    svn: PROPFIND of '/svn': 301 Moved Permanently (http://localhost)
    Any ideas?

Page 1 of 4 123 ... LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •