Ubuntu Forums ubuntu.com - launchpad.net - ubuntu help  

Go Back   Ubuntu Forums > The Ubuntu Forum Community > Other Community Discussions > Tutorials & Tips
Register Reset Password Forum Help Forum Council Search Today's Posts Mark Forums Read

Ubuntu 9.10 is out!!!

When downloading Ubuntu 9.10 please consider using bittorrent to get your copy of Ubuntu.

The Ubuntu Developers Summit for Lucid Lynx will be held the week of 16-Nov-2009 till 20-Nov-2009 in Dallas, TX USA. Visit the the Ubuntu wiki for more information about UDS and how to participate remotely.

Tutorials & Tips
The place to find Ubuntu related Tips & Tricks.

 
Thread Tools Display Modes
Old August 1st, 2006   #11
t800t8
First Cup of Ubuntu
 
Join Date: Aug 2006
Beans: 11
Re: HOWTO - Apache2 + Subversion + SSL

I'm trying to follow this HOWTO but when I try to add port to ports.conf in Dapper Drake 6.06 by using

Code:
sudo echo "Listen 443" >> /etc/apache2/ports.conf
I've got a "Permission denied" message. How can I fix it? Thanks a lot
t800t8 is offline   Reply With Quote
Old August 1st, 2006   #12
t800t8
First Cup of Ubuntu
 
Join Date: Aug 2006
Beans: 11
Re: HOWTO - Apache2 + Subversion + SSL

Fixed it myself: Stop Apache first
t800t8 is offline   Reply With Quote
Old September 13th, 2006   #13
Machtyn
First Cup of Ubuntu
 
Join Date: Sep 2006
My beans are hidden!
Re: HOWTO - Apache2 + Subversion + SSL

I am having the same problem as someone earlier posted:
Code:
~# svn import .bashrc http://localhost/svn/testfile -mlogentry
svn: PROPFIND request failed on '/svn/testfile'
svn: PROPFIND of '/svn/testfile': 403 Forbidden (http://localhost)
# svn import .bashrc https://localhost/svn/testfile -mlogentry
svn: PROPFIND request failed on '/svn/testfile'
svn: PROPFIND of '/svn/testfile': 403 Forbidden (https://localhost)
I've even verified I have libapache2-svn installed
Code:
# apt-get install libapache2-svn
Reading package lists... Done
Building dependency tree... Done
libapache2-svn is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
I've verified my steps in the how-to.
Any other ideas?
Machtyn is offline   Reply With Quote
Old September 13th, 2006   #14
Machtyn
First Cup of Ubuntu
 
Join Date: Sep 2006
My beans are hidden!
Re: HOWTO - Apache2 + Subversion + SSL

I found my mistake. It was in the dav_svn.conf file.
I had enabled the following:
Code:
  # AuthzSVNAccessFile /etc/apache2/dav_svn.authz
As you can see I disabled and restarted apache2. everything is fine.
Machtyn is offline   Reply With Quote
Old October 31st, 2006   #15
airtonix
Dipped in Ubuntu
 
airtonix's Avatar
 
Join Date: Oct 2005
Location: Adelaide, South Australia
Beans: 589
Ubuntu 8.10 Intrepid Ibex
Re: HOWTO - Apache2 + Subversion + SSL

try this...

check out the empty-only-just-now-created-repository :
Code:
/var/www/projects:$ svn co svn+ssh://localhost/svn-repos/project-name ./project-name
then create your-test-file-for-inclusion :
Code:
/var/www/projects:$ echo 'text for inclusion' >> test.txt
then add it
Code:
/var/www/projects:$ svn import ./
then import it
Code:
/var/www/projects:$ svn commit  svn+ssh://localhost/svn-repos/project-name ./project-name
does that work or am i confused too?
__________________
Fear is the mindkiller....
The little death that obliterates...
airtonix is offline   Reply With Quote
Old November 2nd, 2006   #16
jessecollins
5 Cups of Ubuntu
 
Join Date: Jun 2006
Location: Jacksonville, FL
Beans: 31
Ubuntu 8.10 Intrepid Ibex
Re: HOWTO - Apache2 + Subversion + SSL

I just created a script that will automate the installation and setup of Subversion and Apache2. At this point SSL is not implemented but I am planning on getting to that in the future.

It can be found here. Hopefully it will be useful for someone.
__________________
http://jessejcollins.com
jessecollins is offline   Reply With Quote
Old December 4th, 2006   #17
n8v
First Cup of Ubuntu
 
Join Date: Dec 2006
Location: Fairbanks, Alaska
Beans: 2
Ubuntu 6.10 Edgy
Re: HOWTO - Apache2 + Subversion + SSL

Quote:
Originally Posted by Sniper PT View Post
Any error, please report! (and not only in the istructions but also in the english...)
Thanks for your documentation, Sniper PT!

Here is an update with corrected English and a little fancier markup. I also added in some other users' notes, and 'a2enmod dav_svn', which I had to do with Edgy Eft; I'm not sure if it was necessary before?

HOWTO Install Subversion + Apache2 + SSL


References:
This example configures a web-accessible Subversion repository on Ubuntu using Basic Authentication and SSL.
  1. Install apache2:
    Code:
    sudo apt-get install apache2
    (if you want php and mysql too, follow this guide)
  2. Install subversion and mod_dav_svn:

    First, you need to have the 'universe' Ubuntu software repository enabled, if you haven't already enabled it. To enable it, uncomment the following lines in "/etc/apt/sources.list"-- the release name in your file should match your Ubuntu release:
    Code:
    deb http://ro.archive.ubuntu.com/ubuntu hoary universe 
    deb-src http://ro.archive.ubuntu.com/ubuntu hoary universe
    Install Subversion:
    Code:
    sudo apt-get install subversion
    You'll also need to install libapache2-svn:
    Code:
    sudo apt-get install libapache2-svn
    If you don't want SSL, skip to the "Edit your Apache configuration for Subversion" step below. (dav_svn.conf configurations, and users accounts).
  3. Enable SSL
    1. Enable the SSL Apache module
      Code:
      sudo a2enmod ssl
    2. Add "Listen 443" to /etc/apache2/ports.conf:
      Code:
      sudo gedit /etc/apache2/ports.conf
    3. Generate a new self-signed certificate:
      Code:
      apache2-ssl-certificate
    4. Create a new Apache configuration file for an SSL virtual host named 'myown-ssl':
      Code:
      sudo cp /etc/apache2/sites-available/default /etc/apache2/sites-available/myown-ssl
    5. Edit your 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
    6. Activate your new virtual host and restart Apache:
      Code:
      sudo a2ensite myown-ssl
      sudo /etc/init.d/apache2 restart
  4. Edit your Apache configuration for Subversion

    Edit the dav_svn configuration file and follow the instructions in the comments:
    Code:
    sudo gedit /etc/apache2/mods-available/dav_svn.conf
    It will look something like this:

    Code:
    # dav_svn.conf - Example Subversion/Apache configuration
    #
    # For details and further options see the Apache user manual and
    # the Subversion book.
    
    # <Location URL> ... </Location>
    # URL controls how the repository appears to the outside world.
    # In this example clients access the repository as http://hostname/svn/
    <Location /svn>
    
      # Uncomment this to enable the repository,
      DAV svn
    
      # Set this to the path to your repository
      SVNPath /srv/svn
    
      # The following allows for basic http authentication.  Basic authentication
      # should not be considered secure for any particularly rigorous definition of
      # secure.
    
      # to create a passwd file
      # # rm -f /etc/apache2/dav_svn.passwd
      # # htpasswd2 -c /etc/apache2/dav_svn.passwd dwhedon
      # New password:
      # Re-type new password:
      # Adding password for user dwhedon
      # #
    
      # Uncomment the following 3 lines to enable Basic Authentication
      AuthType Basic
      AuthName "Subversion Repository"
      AuthUserFile /etc/apache2/dav_svn.passwd
    
      # Uncomment the following line to enable Authz Authentication
      # AuthzSVNAccessFile /etc/apache2/dav_svn.authz
    
      # The following three lines allow anonymous read, but make
      # committers authenticate themselves.
    
      <LimitExcept GET PROPFIND OPTIONS REPORT>
        Require valid-user
      </LimitExcept>
    
    </Location>
  5. Create a new Subversion repository owned by the user who runs Apache:
    Code:
    sudo svnadmin create /srv/svn
    sudo chown -R www-data:www-data /srv/svn
    sudo chmod -R g+ws /srv/svn
  6. Create the htpasswd (user account) file for Basic Authentication:
    Code:
    sudo htpasswd2 -c /etc/apache2/dav_svn.passwd svnuser
    (it will prompt for svnuser's new password)
  7. Enable mod_dav and mod_dav_svn:
    Code:
    sudo a2enmod dav
    sudo a2enmod dav_svn
    /etc/init.d/apache2 force-reload
  8. Check that you can browse your empty repository at this URL:
    https://localhost/svn/

    You should see a page titled "Revision 0: /".

  9. Test adding a file to your repository using the command-line Subversion client:
    Code:
    svn import .bashrc https://localhost/svn/testfile -m "change log entry"
n8v is offline   Reply With Quote
Old January 9th, 2007   #18
wuhaa
5 Cups of Ubuntu
 
wuhaa's Avatar
 
Join Date: Jul 2006
Location: Canada
Beans: 39
Kubuntu 9.04 Jaunty Jackalope
Re: HOWTO - Apache2 + Subversion + SSL

Hi,

How do I generate multiple ssl cert. for virtual host setup. For example, i want to make a ssl cert for 2 different virtual hosts site1.com and site2.com

Thanks,
wuhaa is offline   Reply With Quote
Old January 15th, 2007   #19
n8v
First Cup of Ubuntu
 
Join Date: Dec 2006
Location: Fairbanks, Alaska
Beans: 2
Ubuntu 6.10 Edgy
Re: HOWTO - Apache2 + Subversion + SSL

wuhaa, there might be more specific tips on the SSL tutorial or the Apache docs, but I'll offer one tip off the top of my head-- you need a separate IP address for each SSL virtual host. You can't do name-based virtual hosting with SSL because the web server needs to send the SSL cert to the client before it can read the hostname from the encrypted HTTP headers.
n8v is offline   Reply With Quote
Old April 23rd, 2007   #20
mike.thorton
5 Cups of Ubuntu
 
mike.thorton's Avatar
 
Join Date: Aug 2006
Beans: 24
Re: HOWTO - Apache2 + Subversion + SSL

for generating the ssl certificate under feisty works:
Code:
/usr/sbin/make-ssl-cert /usr/share/ssl-cert/ssleay.cnf /etc/apache2/ssl/apache.pem
if there's no /usr/sbin/make-ssl-cert, just do:

Code:
sudo apt-get install ssl-cert

Last edited by mike.thorton; April 23rd, 2007 at 09:45 AM..
mike.thorton is offline   Reply With Quote

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 05:10 AM.


vBulletin ©2000 - 2009, Jelsoft Enterprises Ltd. Ubuntu Logo, Ubuntu and Canonical © Canonical Ltd. Tango Icons © Tango Desktop Project. bilberry