Apache + SVN on Fedora

Create SVN repo, accessible from network, all users can read & checkout, certain users can write / commit

Software: Apache 2.2.11, Subversion 1.6.6, mod_dav_svn 1.6.6

File & folder:

/var/svn/auth – authentication file
/var/svn/repos/ – project repositories

Install mod_dav_svn

yum install mod_dav_svn svn

Create SVN repo (refer previous post)

svnadmin create --fs-type fsfs /var/svn/repos/testproj

Create authentication file

htdigest [-c] <auth file> <realm> <username>
htdigest -c /var/svn/auth "Project Repository" user1

c – create file (exclude this flag when adding users)

Setup Apache + mod_dav_svn

vim /etc/httpd/conf.d/subversion.conf
LoadModule dav_svn_module modules/mod_dav_svn.so
LoadModule authz_svn_module modules/mod_authz_svn.so

<Location /svn>
  DAV svn
  SVNParentPath /var/svn/repos
  SVNListParentPath On
  AuthType Digest
  AuthName "Project Repository"
  AuthUserFile /var/svn/auth
    Require valid-user

Change ownership of the whole svn repo dir

chown -R apache.apache /var/svn

Note: Re-assign the ownership everytime you create a new repo

Lastly, reload apache

service httpd reload

View list of projects – http://localhost/svn
View contents of particular (myproj) project – http://localhost/svn/myproj

Thunderbird calendar + WebDAV

Users synchronize their calendar in Thunderbird with calendar server (WebDAV) on Fedora

Install Thunderbird & calendar plugin:

yum install thunderbird thunderbird-lightning

Install apache + mod dav:

yum install httpd mod_dav_svn

Calendars will be stored in /home/webmaster/calendar. Make sure to chmod 755 /home/webmaster

Setting up apache:


<IfModule mod_dav.c>
  Alias /calendar /home/webmaster/calendar
  <Directory /home/webmaster/calendar>
    DAV On
    Options +Indexes
    AuthType Basic
    AuthName "Calendar Authentication"
    AuthUserFile /home/webmaster/calendar.htpasswd
    <LimitExcept GET OPTIONS>
      require valid-user
    Order allow,deny
    Allow from all
<Directory /home/webmaster/calendar>
  AuthUserFile /home/webmaster/calendar.htpasswd
  AuthName "Calendar Authentication"
  AuthType basic
  require valid-user

Create user & password:

htpasswd -cb /home/webmaster/calendar.htpasswd username password

Create calendar directory & set permission:

mkdir /home/webmaster/calendar
chown -R apache /home/webmaster/calendar

Test the new configuration:

touch calendar.ics
cadaver http://localhost/calendar
put calendar.ics

Refer /var/log/httpd/error_log if there’s any error. Always check folder permission.

Create new calendar for Thunderbird (calendar name: Personal):

touch Personal.ics
cadaver http://localhost/calendar
put Personal.ics

Launch Thunderbird

  1. Events & Tasks > Calendar (or Ctrl+Shift+C)
  2. File > New > Calendar
  3. ‘On the network’
  4. ‘iCalendar (ICS)’, location: http://localhost/calendar/Personal.ics
  5. Enter username & password (in /home/webmaster/calendar.htpasswd)
Create new event for the new calendar