Installing apache2 and subversion in ubuntu
Installing apache2
$ sudo apt-get install apache2
Installing subversion
$ sudo apt-get install subversion
Installing libapache2-svn
$ sudo apt-get install libapache2-svn
Creating SVN directory
$ sudo mkdir /home/svn
$ cd /home/svn
$ sudo mkdir project
$ sudo svnadmin create /home/svn/project
$ cd /home/svn
$ sudo chown -R www-data:subversion project
$ sudo chmod -R g+rws project
$ sudo gedit /etc/apache2/mods-available/dav_svn.conf
<Location /svn>
DAV svn
SVNParentPath /home/svn
SVNListParentPath On
AuthType Basic
AuthName "Subversion Repository"
AuthUserFile /etc/subversion/passwd
# To enable authorization via mod_authz_svn
AuthzSVNAccessFile /etc/apache2/svn_access_control
# <LimitExcept GET PROPFIND OPTIONS REPORT>
Require valid-user
# </LimitExcept>
</Location>
$ sudo /etc/init.d/apache2 restart
if it's first time use this:
$ sudo htpasswd -c /etc/subversion/passwd user_name
else
$ sudo htpasswd /etc/subversion/passwd second_user_name
$ cat /etc/subversion/passwd
$ sudo touch /etc/apache2/svn_access_control
$ sudo gedit /etc/apache2/svn_access_control
Editing:
[groups]
admin = bob, bill
developers = bob, barry, brett
[/]
@admin = r
bob = rw
[/wowapp/trunk]
@admin = r
@developers = rw
brenda = rw
$ sudo /etc/init.d/apache2 restart
Add ssl :
sudo mkdir /etc/apache2/ssl
sudo openssl req -new -x509 -days 365 -nodes -out /etc/apache2/ssl/apache.pem -keyout /etc/apache2/ssl/apache.pe
It prompts you to enter the some informations
$ sudo a2enmod ssl
$ sudo gedit /etc/apache2/ports.conf
# If you just change the port or add more ports here, you will likely also
# have to change the VirtualHost statement in
# /etc/apache2/sites-enabled/000-default
# This is also true if you have upgraded from before 2.2.9-3 (i.e. from
# Debian etch). See /usr/share/doc/apache2.2-common/NEWS.Debian.gz and
# README.Debian.gz
NameVirtualHost *:80
Listen 80
<IfModule mod_ssl.c>
# SSL name based virtual hosts are not yet supported, therefore no
# NameVirtualHost statement here
Listen 443
</IfModule>
$ sudo cp /etc/apache2/sites-available/default /etc/apache2/sites-available/myown-ssl
$ sudo gedit /etc/apache2/sites-available/myown-ssl
change to
<VirtualHost *:443>
Add before </VirtualHost>:
Code:
SSLEngine on
SSLCertificateFile /etc/apache2/ssl/apache.pem
SSLProtocol all
SSLCipherSuite HIGH:MEDIUM
$ sudo a2ensite myown-ssl
$ sudo /etc/init.d/apache2 restart
When I tried to do a re-start from Terminal, I got:
$ sudo /etc/init.d/apache2 restart
* Forcing reload of web server (apache2)...
apache2: Could not reliably determine the server's fully qualified domain name, using
127.0.0.1 for ServerName
httpd (no pid file) not running
apache2: Could not reliably determine the server's fully qualified
domain name, using 127.0.0.1 for ServerName
To fix it up:
$ sudo netstat -anp | grep '^tcp.*LISTEN'
$ sudo /etc/init.d/apache2 restart
https://127.0.0.1:443/svn/project/
http://127.0.0.1/svn/project/
Installing SVN client:
sudo apt-get install rapidsvn
Done with it!