SlideShare a Scribd company logo
1 of 49
Download to read offline
Build a Versioning File System
using WebDAV and Subversion

                  BCN Sudoers
                  javier@rodriguez.org.mx
                                20120103
                   http://slideshare.net/codehead
WebDAV
●   RFC4918: HTTP Extensions for Web Distributed
    Authoring and Versioning (WebDAV)
●   http://www.webdav.org/
WEBDAV METHODS
         WebDAV Methods
●   PROPFIND
●   PROPPATCH
●   MKCOL
●   COPY
●   MOVE
●   LOCK
●   UNLOCK
●
              the B
                   '
        WHATS Windows IG DE
                            AL
    May use HTTP or HTTPS as transport layer
                                               ?
    ●   Use existing infrastructure
●   Binary transparent
●   Can be used as a remote filesystem
Apache httpd
Web Browser   HTTP

              filesystem
Apache httpd
WebDAV Client   WebDAV


                 HTTP

                 filesystem
Windows ENTS
                   AV CLI
        WEBD

●   Mount as a filesystem


                            ●   FTP-like interface
Windows S
                   WINDOW
●   Native “Web Folders”   ●   MS Office
    (Mostly broken)        ●   Bit Kinex
●   Xythos Drive           ●   CyberDuck
                           ●   WebDrive $
                           ●   GoodSync $
MAC
                    Mac
●   Native Finder    ●   iWork
●   MacFUSE          ●   CyberDuck
Linux
              LINUX
●   davfs2         ●   KDE konqueror
●   fusedav        ●   KDE dolphin
                   ●   Gnome Nautilus
                   ●   cadaver
Re  c ipe 1
      Subversion



WebDAV server using Apache2
In Dependencies s
               gredient
●   Mandatory
    ●   apache2-mpm-prefork
●   Optional
    ●   libapache2-mod-auth-*
Hello, mod-ssl
<VirtualHost _default_:443>
        ServerAdmin webmaster@localhost
        DocumentRoot /var/www
        <Directory />
                Options FollowSymLinks
                AllowOverride None
        </Directory>
        <Directory /var/www/>
                Options Indexes FollowSymLinks MultiViews
                AllowOverride None
                Order allow,deny
                allow from all
        </Directory>

       ErrorLog ${APACHE_LOG_DIR}/error.log
       LogLevel warn
       CustomLog ${APACHE_LOG_DIR}/ssl_access.log combined

       SSLEngine on
       SSLCertificateFile    /etc/ssl/certs/webdav.pem
       SSLCertificateKeyFile /etc/ssl/private/webdav.key

        BrowserMatch "MSIE [2-6]" 
                nokeepalive ssl-unclean-shutdown 
                downgrade-1.0 force-response-1.0
        BrowserMatch "MSIE [17-9]" ssl-unclean-shutdown
</VirtualHost>
Enable webd
                                 av
# a2enmod ssl dav_svn dav_fs
# mkdir /var/lib/webdav
# chown -R www-data.www-data /var/lib/webdav


       Alias /webdav/ /var/lib/webdav/
       <Location /webdav>
               DAV On
               AuthBasicProvider file
               AuthType Basic
               AuthUserFile htpasswd
               AuthName "WebDAV"
               require valid-user
               Options +Indexes
               DirectoryIndex
       </Location>
Enable webd
                                 av
# a2enmod ssl dav_svn dav_fs
# mkdir /var/lib/webdav
# chown -R www-data.www-data /var/lib/webdav


       Alias /webdav/ /var/lib/webdav/
       <Location /webdav>                      Specify a real path
               DAV On
               AuthBasicProvider file
               AuthType Basic
               AuthUserFile htpasswd
               AuthName "WebDAV"
               require valid-user
               Options +Indexes
               DirectoryIndex
       </Location>
Enable webd
                                 av
# a2enmod ssl dav_svn dav_fs
# mkdir /var/lib/webdav
# chown -R www-data.www-data /var/lib/webdav


       Alias /webdav/ /var/lib/webdav/
       <Location /webdav>
               DAV On
               AuthBasicProvider file    Turn DAV on
               AuthType Basic
               AuthUserFile htpasswd
               AuthName "WebDAV"
               require valid-user
               Options +Indexes
               DirectoryIndex
       </Location>
Enable webd
                                 av
# a2enmod ssl dav_svn dav_fs
# mkdir /var/lib/webdav
# chown -R www-data.www-data /var/lib/webdav


       Alias /webdav/ /var/lib/webdav/
       <Location /webdav>
               DAV On
               AuthBasicProvider file
               AuthType Basic                  Season to taste
               AuthUserFile htpasswd
               AuthName "WebDAV"
               require valid-user
               Options +Indexes
               DirectoryIndex
       </Location>
TEST webdav
TEST webdav




                                                       Apache httpd
   Web Browser                           HTTP

                                          filesystem




# curl --insecure --user testuser https://sandbox.ascii164.com/webdav/
TEST webdav




                                                         Apache httpd
    WebDAV Client                        WebDAV


                                           HTTP

                                            filesystem



#   mkdir /mnt/dav
#   mount -t davfs https://sandbox.ascii164.com/webdav/ /mnt/dav
#   mount
#   ls /mnt/dav
Subversionn
                  v ersio
           sub
●   Delta-V WebDAV Versioning Extension
    (RFC3253)
●   CollabNet → Apache Software Foundation
●   http://subversion.apache.org/
RECIPE
  Subversion
          2


svn server using Apache2
Dependenciests
                       re dien
                Ing
●   Mandatory
    ●   apache2-mpm-prefork
    ●   libapache2-svn
    ●   subversion
●   Optional
    ●   libapache2-mod-dnssd
    ●   libapache2-mod-auth-*
Enable SUBV
                            ERSION
# mkdir /var/lib/svn
# svnadmin create /var/lib/svn/repo
# chown -R www-data.www-data /var/lib/svn

       <Location /svn>
               DAV svn
               SVNParentPath /var/lib/svn
               AuthBasicProvider file
               AuthType Basic
               AuthUserFile htpasswd
               AuthName "Subversion"
               require valid-user
               Options +Indexes
               DirectoryIndex
       </Location>
Enable SUBV
                            ERSION
# mkdir /var/lib/svn
# svnadmin create /var/lib/svn/repo
# chown -R www-data.www-data /var/lib/svn

       <Location /svn>
               DAV svn             Virtual Path
               SVNParentPath /var/lib/svn
               AuthBasicProvider file
               AuthType Basic
               AuthUserFile htpasswd
               AuthName "Subversion"
               require valid-user
               Options +Indexes
               DirectoryIndex
       </Location>
Enable SUBV
                            ERSION
# mkdir /var/lib/svn
# svnadmin create /var/lib/svn/repo
# chown -R www-data.www-data /var/lib/svn

       <Location /svn>
               DAV svn
               SVNParentPath /var/lib/svnFile System
                                  svn DAV
               AuthBasicProvider file
               AuthType Basic
               AuthUserFile htpasswd
               AuthName "Subversion"
               require valid-user
               Options +Indexes
               DirectoryIndex
       </Location>
Enable SUBV
                            ERSION
# mkdir /var/lib/svn
# svnadmin create /var/lib/svn/repo
# chown -R www-data.www-data /var/lib/svn

       <Location /svn>
               DAV svn
               SVNParentPath /var/lib/svn       Repo Root
               AuthBasicProvider file        (Use SVNPath
               AuthType Basic               for a single repo)
               AuthUserFile htpasswd
               AuthName "Subversion"
               require valid-user
               Options +Indexes
               DirectoryIndex
       </Location>
TES T SUBVERSION
TES T SUBVERSION


      SVN Client                          Delta-V




                                                         Apache httpd
                                         WebDAV


                                           HTTP


                                              libsvn


                                            filesystem


# svn mkdir https://sandbox.ascii164.com/svn/repo/trunk/ 
    https://sandbox.ascii164.com/svn/repo/tags/ 
    https://sandbox.ascii164.com/svn/repo/branches/
# svn ls https://sandbox.ascii164.com/svn/repo/
TES T SUBVERSION


                                          Delta-V




                                                         Apache httpd
                                         WebDAV


     Web Browser                           HTTP


                                              libsvn


                                            filesystem



# curl --insecure --user testuser https://sandbox.ascii164.com/svn/repo/
v ersi oning

      vs

   backup
WHEN
should I create
  a new version   ?
Subversion
      ipe 3
 Rec


autoversioning filesystem
Enable auto
                    versioning
# mkdir /var/lib/svn
# svnadmin create /var/lib/svn/documents
# chown -R www-data.www-data /var/lib/svn

       <Location /documents>
               DAV svn
               SVNPath /var/lib/svn/documents
               SVNAutoVersioning on
               ModMimeUsePathInfo on
               AuthBasicProvider file
               AuthType Basic
               AuthUserFile htpasswd
               AuthName "Documents"
               require valid-user
               Options +Indexes
               DirectoryIndex
       </Location>
EST autov ersioning
          T


                                        Delta-V




                                                       Apache httpd
  WebDAV Client                        WebDAV


                                         HTTP


                                            libsvn


                                          filesystem
# mkdir /mnt/docs
# mount -t davfs https://sandbox.ascii164.com/documents/ 
    /mnt/docs
# mount
# ls /mnt/docs
EST autov ersioning
            T


      SVN Client                          Delta-V




                                                         Apache httpd
                                         WebDAV


                                           HTTP


                                              libsvn


                                            filesystem


# svn ls https://sandbox.ascii164.com/documents/
MORE RESOUR
            Further ResourcesS
                          CE
●   http://svnbook.red-bean.com/
CO ME
                       W EL
             STI ONS
      Q UE
ALL
BCN S udoers
javier@rodriguez.org.mx
             @codehead
SVN Client   Delta-V




                           Apache httpd
             WebDAV


              HTTP


                libsvn


              filesystem
<Location /svn>

       DAV svn

       SVNParentPath /var/lib/svn

       AuthBasicProvider ldap

       AuthzLDAPAuthoritative off

       AuthType Basic

       AuthName "Document Repository"

       AuthLDAPURL ldap://localhost/ou=Users,dc=company,dc=com?uid?sub?

       require valid-user

</Location>
SVN Client     Delta-V




                              Apache httpd
WebDAV Client   WebDAV


Web Browser      HTTP


                   libsvn


                 filesystem
svn ls https://sandbox.company.com/svn/repo/
SVN Client     Delta-V


WebDAV Client   WebDAV        Apache

Web Browser      HTTP


                   libsvn


                 filesystem
curl https://sandbox.company.com/svn/repo/
ersioning
Autov
SVN Client     Delta-V


WebDAV Client   WebDAV        Apache

Web Browser      HTTP


                   libsvn


                 filesystem
<Location /documents>

       DAV svn

       SVNPath /var/lib/svn/docrepo

       SVNAutoVersioning on

       ModMimeUsePathInfo on

       AuthBasicProvider ldap

       AuthzLDAPAuthoritative off

       AuthType Basic

       AuthName "Document Repository"

       AuthLDAPURL ldap://localhost/ou=Users,dc=company,dc=com?uid?sub?

       require valid-user

</Location>
Client Software

More Related Content

What's hot

ewd-qoper8-vistarpc: Exposing VistA's RPCs as REST Services
ewd-qoper8-vistarpc: Exposing VistA's RPCs as REST Servicesewd-qoper8-vistarpc: Exposing VistA's RPCs as REST Services
ewd-qoper8-vistarpc: Exposing VistA's RPCs as REST ServicesRob Tweed
 
DEVIEW - 오픈소스를 활용한 분산아키텍처 구현기술
DEVIEW - 오픈소스를 활용한 분산아키텍처 구현기술DEVIEW - 오픈소스를 활용한 분산아키텍처 구현기술
DEVIEW - 오픈소스를 활용한 분산아키텍처 구현기술John Kim
 
Scalable Architecture 101
Scalable Architecture 101Scalable Architecture 101
Scalable Architecture 101ConFoo
 
Hadoop meet Rex(How to construct hadoop cluster with rex)
Hadoop meet Rex(How to construct hadoop cluster with rex)Hadoop meet Rex(How to construct hadoop cluster with rex)
Hadoop meet Rex(How to construct hadoop cluster with rex)Jun Hong Kim
 
Automating complex infrastructures with Puppet
Automating complex infrastructures with PuppetAutomating complex infrastructures with Puppet
Automating complex infrastructures with PuppetKris Buytaert
 
Apache httpd 2.4: The Cloud Killer App
Apache httpd 2.4: The Cloud Killer AppApache httpd 2.4: The Cloud Killer App
Apache httpd 2.4: The Cloud Killer AppJim Jagielski
 
Lesson 9. The Apache Web Server
Lesson 9. The Apache Web ServerLesson 9. The Apache Web Server
Lesson 9. The Apache Web Serverwebhostingguy
 
Lessons from running potentially malicious code inside Docker containers
Lessons from running potentially malicious code inside Docker containersLessons from running potentially malicious code inside Docker containers
Lessons from running potentially malicious code inside Docker containersBen Hall
 
Challenges of container configuration
Challenges of container configurationChallenges of container configuration
Challenges of container configurationlutter
 
실시간 서비스 플랫폼 개발 사례
실시간 서비스 플랫폼 개발 사례실시간 서비스 플랫폼 개발 사례
실시간 서비스 플랫폼 개발 사례John Kim
 
How to add a new hypervisor to CloudStack - Lessons learned from Hyper-V effort
How to add a new hypervisor to CloudStack - Lessons learned from Hyper-V effortHow to add a new hypervisor to CloudStack - Lessons learned from Hyper-V effort
How to add a new hypervisor to CloudStack - Lessons learned from Hyper-V effortShapeBlue
 
Usenix LISA 2012 - Choosing a Proxy
Usenix LISA 2012 - Choosing a ProxyUsenix LISA 2012 - Choosing a Proxy
Usenix LISA 2012 - Choosing a ProxyLeif Hedstrom
 
Apache Traffic Server & Lua
Apache Traffic Server & LuaApache Traffic Server & Lua
Apache Traffic Server & LuaKit Chan
 
httpd — Apache Web Server
httpd — Apache Web Serverhttpd — Apache Web Server
httpd — Apache Web Serverwebhostingguy
 
Installation Openstack Swift
Installation Openstack SwiftInstallation Openstack Swift
Installation Openstack Swiftymtech
 
Automating Complex Setups with Puppet
Automating Complex Setups with PuppetAutomating Complex Setups with Puppet
Automating Complex Setups with PuppetKris Buytaert
 
qewd-ripple: The Ripple OSI Middle Tier
qewd-ripple: The Ripple OSI Middle Tierqewd-ripple: The Ripple OSI Middle Tier
qewd-ripple: The Ripple OSI Middle TierRob Tweed
 

What's hot (20)

ewd-qoper8-vistarpc: Exposing VistA's RPCs as REST Services
ewd-qoper8-vistarpc: Exposing VistA's RPCs as REST Servicesewd-qoper8-vistarpc: Exposing VistA's RPCs as REST Services
ewd-qoper8-vistarpc: Exposing VistA's RPCs as REST Services
 
DEVIEW - 오픈소스를 활용한 분산아키텍처 구현기술
DEVIEW - 오픈소스를 활용한 분산아키텍처 구현기술DEVIEW - 오픈소스를 활용한 분산아키텍처 구현기술
DEVIEW - 오픈소스를 활용한 분산아키텍처 구현기술
 
Scalable Architecture 101
Scalable Architecture 101Scalable Architecture 101
Scalable Architecture 101
 
Varnish - PLNOG 4
Varnish - PLNOG 4Varnish - PLNOG 4
Varnish - PLNOG 4
 
Hadoop meet Rex(How to construct hadoop cluster with rex)
Hadoop meet Rex(How to construct hadoop cluster with rex)Hadoop meet Rex(How to construct hadoop cluster with rex)
Hadoop meet Rex(How to construct hadoop cluster with rex)
 
Automating complex infrastructures with Puppet
Automating complex infrastructures with PuppetAutomating complex infrastructures with Puppet
Automating complex infrastructures with Puppet
 
Apache httpd 2.4: The Cloud Killer App
Apache httpd 2.4: The Cloud Killer AppApache httpd 2.4: The Cloud Killer App
Apache httpd 2.4: The Cloud Killer App
 
Lesson 9. The Apache Web Server
Lesson 9. The Apache Web ServerLesson 9. The Apache Web Server
Lesson 9. The Apache Web Server
 
Lessons from running potentially malicious code inside Docker containers
Lessons from running potentially malicious code inside Docker containersLessons from running potentially malicious code inside Docker containers
Lessons from running potentially malicious code inside Docker containers
 
Challenges of container configuration
Challenges of container configurationChallenges of container configuration
Challenges of container configuration
 
실시간 서비스 플랫폼 개발 사례
실시간 서비스 플랫폼 개발 사례실시간 서비스 플랫폼 개발 사례
실시간 서비스 플랫폼 개발 사례
 
Docker
DockerDocker
Docker
 
How to add a new hypervisor to CloudStack - Lessons learned from Hyper-V effort
How to add a new hypervisor to CloudStack - Lessons learned from Hyper-V effortHow to add a new hypervisor to CloudStack - Lessons learned from Hyper-V effort
How to add a new hypervisor to CloudStack - Lessons learned from Hyper-V effort
 
Usenix LISA 2012 - Choosing a Proxy
Usenix LISA 2012 - Choosing a ProxyUsenix LISA 2012 - Choosing a Proxy
Usenix LISA 2012 - Choosing a Proxy
 
Apache Traffic Server & Lua
Apache Traffic Server & LuaApache Traffic Server & Lua
Apache Traffic Server & Lua
 
httpd — Apache Web Server
httpd — Apache Web Serverhttpd — Apache Web Server
httpd — Apache Web Server
 
Installation Openstack Swift
Installation Openstack SwiftInstallation Openstack Swift
Installation Openstack Swift
 
Docker in production
Docker in productionDocker in production
Docker in production
 
Automating Complex Setups with Puppet
Automating Complex Setups with PuppetAutomating Complex Setups with Puppet
Automating Complex Setups with Puppet
 
qewd-ripple: The Ripple OSI Middle Tier
qewd-ripple: The Ripple OSI Middle Tierqewd-ripple: The Ripple OSI Middle Tier
qewd-ripple: The Ripple OSI Middle Tier
 

Similar to Build an autoversioning filesystem with Apache2

Subversion @ JUG Milano 11 dic 2009
Subversion @ JUG Milano 11 dic 2009Subversion @ JUG Milano 11 dic 2009
Subversion @ JUG Milano 11 dic 2009Andrea Francia
 
How Reconnix Is Using Docker
How Reconnix Is Using DockerHow Reconnix Is Using Docker
How Reconnix Is Using DockerRuss Mckendrick
 
How to turn any dynamic website into a static site | 24.01.2018 | Artem Danil...
How to turn any dynamic website into a static site | 24.01.2018 | Artem Danil...How to turn any dynamic website into a static site | 24.01.2018 | Artem Danil...
How to turn any dynamic website into a static site | 24.01.2018 | Artem Danil...LumoSpark
 
Installation of Subversion on Ubuntu,...
Installation of Subversion on Ubuntu,...Installation of Subversion on Ubuntu,...
Installation of Subversion on Ubuntu,...wensheng wei
 
WordPress Development Environments
WordPress Development Environments WordPress Development Environments
WordPress Development Environments Ohad Raz
 
Linux advanced concepts - Part 2
Linux advanced concepts - Part 2Linux advanced concepts - Part 2
Linux advanced concepts - Part 2NAILBITER
 
Control your deployments with Capistrano
Control your deployments with CapistranoControl your deployments with Capistrano
Control your deployments with CapistranoRamazan K
 
[Devconf.cz][2017] Understanding OpenShift Security Context Constraints
[Devconf.cz][2017] Understanding OpenShift Security Context Constraints[Devconf.cz][2017] Understanding OpenShift Security Context Constraints
[Devconf.cz][2017] Understanding OpenShift Security Context ConstraintsAlessandro Arrichiello
 
UEMB200: Next Generation of Endpoint Management Architecture and Discovery Se...
UEMB200: Next Generation of Endpoint Management Architecture and Discovery Se...UEMB200: Next Generation of Endpoint Management Architecture and Discovery Se...
UEMB200: Next Generation of Endpoint Management Architecture and Discovery Se...Ivanti
 
Ubuntu安装SVN总结
Ubuntu安装SVN总结Ubuntu安装SVN总结
Ubuntu安装SVN总结wensheng wei
 
Using and scaling Rack and Rack-based middleware
Using and scaling Rack and Rack-based middlewareUsing and scaling Rack and Rack-based middleware
Using and scaling Rack and Rack-based middlewareAlona Mekhovova
 
Subversion on-the-fly replication
Subversion on-the-fly replicationSubversion on-the-fly replication
Subversion on-the-fly replicationnormanmaurer
 
PowerPoint Presentation
PowerPoint PresentationPowerPoint Presentation
PowerPoint Presentationwebhostingguy
 
Continuous Delivery with Maven, Puppet and Tomcat - ApacheCon NA 2013
Continuous Delivery with Maven, Puppet and Tomcat - ApacheCon NA 2013Continuous Delivery with Maven, Puppet and Tomcat - ApacheCon NA 2013
Continuous Delivery with Maven, Puppet and Tomcat - ApacheCon NA 2013Carlos Sanchez
 
Ch 22: Web Hosting and Internet Servers
Ch 22: Web Hosting and Internet ServersCh 22: Web Hosting and Internet Servers
Ch 22: Web Hosting and Internet Serverswebhostingguy
 
Killer Docker Workflows for Development
Killer Docker Workflows for DevelopmentKiller Docker Workflows for Development
Killer Docker Workflows for DevelopmentChris Tankersley
 
Linux System Administration - Web Server and squid setup
Linux System Administration - Web Server and squid setupLinux System Administration - Web Server and squid setup
Linux System Administration - Web Server and squid setupSreenatha Reddy K R
 
Postgres the hardway
Postgres the hardwayPostgres the hardway
Postgres the hardwayDave Pitts
 

Similar to Build an autoversioning filesystem with Apache2 (20)

Subversion @ JUG Milano 11 dic 2009
Subversion @ JUG Milano 11 dic 2009Subversion @ JUG Milano 11 dic 2009
Subversion @ JUG Milano 11 dic 2009
 
How Reconnix Is Using Docker
How Reconnix Is Using DockerHow Reconnix Is Using Docker
How Reconnix Is Using Docker
 
How to turn any dynamic website into a static site | 24.01.2018 | Artem Danil...
How to turn any dynamic website into a static site | 24.01.2018 | Artem Danil...How to turn any dynamic website into a static site | 24.01.2018 | Artem Danil...
How to turn any dynamic website into a static site | 24.01.2018 | Artem Danil...
 
Installation of Subversion on Ubuntu,...
Installation of Subversion on Ubuntu,...Installation of Subversion on Ubuntu,...
Installation of Subversion on Ubuntu,...
 
WordPress Development Environments
WordPress Development Environments WordPress Development Environments
WordPress Development Environments
 
Linux advanced concepts - Part 2
Linux advanced concepts - Part 2Linux advanced concepts - Part 2
Linux advanced concepts - Part 2
 
Control your deployments with Capistrano
Control your deployments with CapistranoControl your deployments with Capistrano
Control your deployments with Capistrano
 
[Devconf.cz][2017] Understanding OpenShift Security Context Constraints
[Devconf.cz][2017] Understanding OpenShift Security Context Constraints[Devconf.cz][2017] Understanding OpenShift Security Context Constraints
[Devconf.cz][2017] Understanding OpenShift Security Context Constraints
 
UEMB200: Next Generation of Endpoint Management Architecture and Discovery Se...
UEMB200: Next Generation of Endpoint Management Architecture and Discovery Se...UEMB200: Next Generation of Endpoint Management Architecture and Discovery Se...
UEMB200: Next Generation of Endpoint Management Architecture and Discovery Se...
 
Ubuntu安装SVN总结
Ubuntu安装SVN总结Ubuntu安装SVN总结
Ubuntu安装SVN总结
 
Using and scaling Rack and Rack-based middleware
Using and scaling Rack and Rack-based middlewareUsing and scaling Rack and Rack-based middleware
Using and scaling Rack and Rack-based middleware
 
Subversion on-the-fly replication
Subversion on-the-fly replicationSubversion on-the-fly replication
Subversion on-the-fly replication
 
PowerPoint Presentation
PowerPoint PresentationPowerPoint Presentation
PowerPoint Presentation
 
Continuous Delivery with Maven, Puppet and Tomcat - ApacheCon NA 2013
Continuous Delivery with Maven, Puppet and Tomcat - ApacheCon NA 2013Continuous Delivery with Maven, Puppet and Tomcat - ApacheCon NA 2013
Continuous Delivery with Maven, Puppet and Tomcat - ApacheCon NA 2013
 
Ch 22: Web Hosting and Internet Servers
Ch 22: Web Hosting and Internet ServersCh 22: Web Hosting and Internet Servers
Ch 22: Web Hosting and Internet Servers
 
Chap 19 web
Chap 19 webChap 19 web
Chap 19 web
 
Killer Docker Workflows for Development
Killer Docker Workflows for DevelopmentKiller Docker Workflows for Development
Killer Docker Workflows for Development
 
Linux System Administration - Web Server and squid setup
Linux System Administration - Web Server and squid setupLinux System Administration - Web Server and squid setup
Linux System Administration - Web Server and squid setup
 
Write php deploy everywhere
Write php deploy everywhereWrite php deploy everywhere
Write php deploy everywhere
 
Postgres the hardway
Postgres the hardwayPostgres the hardway
Postgres the hardway
 

More from Javier Arturo Rodríguez

More from Javier Arturo Rodríguez (9)

Introduction to ansible
Introduction to ansibleIntroduction to ansible
Introduction to ansible
 
Minimizing cognitive load
 in Perl source code parsing (a.k.a. Pretty program...
Minimizing cognitive load
 in Perl source code parsing (a.k.a. Pretty program...Minimizing cognitive load
 in Perl source code parsing (a.k.a. Pretty program...
Minimizing cognitive load
 in Perl source code parsing (a.k.a. Pretty program...
 
WordPress Performance Tuning
WordPress Performance TuningWordPress Performance Tuning
WordPress Performance Tuning
 
WordPress for SysAdmins
WordPress for SysAdminsWordPress for SysAdmins
WordPress for SysAdmins
 
Easy native wrappers with SWIG
Easy native wrappers with SWIGEasy native wrappers with SWIG
Easy native wrappers with SWIG
 
Open Data: a view from the trenches
Open Data: a view from the trenchesOpen Data: a view from the trenches
Open Data: a view from the trenches
 
Barcelona.pm Curs1211 sess01
Barcelona.pm Curs1211 sess01Barcelona.pm Curs1211 sess01
Barcelona.pm Curs1211 sess01
 
Periodismo de Datos II: Construyendo y explorando conjuntos de datos con las ...
Periodismo de Datos II: Construyendo y explorando conjuntos de datos con las ...Periodismo de Datos II: Construyendo y explorando conjuntos de datos con las ...
Periodismo de Datos II: Construyendo y explorando conjuntos de datos con las ...
 
DatosEnCrudo.org
DatosEnCrudo.orgDatosEnCrudo.org
DatosEnCrudo.org
 

Recently uploaded

AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Principled Technologies
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsRoshan Dwivedi
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 

Recently uploaded (20)

AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 

Build an autoversioning filesystem with Apache2

  • 1. Build a Versioning File System using WebDAV and Subversion BCN Sudoers javier@rodriguez.org.mx 20120103 http://slideshare.net/codehead
  • 2. WebDAV ● RFC4918: HTTP Extensions for Web Distributed Authoring and Versioning (WebDAV) ● http://www.webdav.org/
  • 3. WEBDAV METHODS WebDAV Methods ● PROPFIND ● PROPPATCH ● MKCOL ● COPY ● MOVE ● LOCK ● UNLOCK
  • 4. the B ' WHATS Windows IG DE AL May use HTTP or HTTPS as transport layer ? ● Use existing infrastructure ● Binary transparent ● Can be used as a remote filesystem
  • 5. Apache httpd Web Browser HTTP filesystem
  • 6. Apache httpd WebDAV Client WebDAV HTTP filesystem
  • 7. Windows ENTS AV CLI WEBD ● Mount as a filesystem ● FTP-like interface
  • 8. Windows S WINDOW ● Native “Web Folders” ● MS Office (Mostly broken) ● Bit Kinex ● Xythos Drive ● CyberDuck ● WebDrive $ ● GoodSync $
  • 9. MAC Mac ● Native Finder ● iWork ● MacFUSE ● CyberDuck
  • 10. Linux LINUX ● davfs2 ● KDE konqueror ● fusedav ● KDE dolphin ● Gnome Nautilus ● cadaver
  • 11. Re c ipe 1 Subversion WebDAV server using Apache2
  • 12. In Dependencies s gredient ● Mandatory ● apache2-mpm-prefork ● Optional ● libapache2-mod-auth-*
  • 13. Hello, mod-ssl <VirtualHost _default_:443> ServerAdmin webmaster@localhost DocumentRoot /var/www <Directory /> Options FollowSymLinks AllowOverride None </Directory> <Directory /var/www/> Options Indexes FollowSymLinks MultiViews AllowOverride None Order allow,deny allow from all </Directory> ErrorLog ${APACHE_LOG_DIR}/error.log LogLevel warn CustomLog ${APACHE_LOG_DIR}/ssl_access.log combined SSLEngine on SSLCertificateFile /etc/ssl/certs/webdav.pem SSLCertificateKeyFile /etc/ssl/private/webdav.key BrowserMatch "MSIE [2-6]" nokeepalive ssl-unclean-shutdown downgrade-1.0 force-response-1.0 BrowserMatch "MSIE [17-9]" ssl-unclean-shutdown </VirtualHost>
  • 14. Enable webd av # a2enmod ssl dav_svn dav_fs # mkdir /var/lib/webdav # chown -R www-data.www-data /var/lib/webdav Alias /webdav/ /var/lib/webdav/ <Location /webdav> DAV On AuthBasicProvider file AuthType Basic AuthUserFile htpasswd AuthName "WebDAV" require valid-user Options +Indexes DirectoryIndex </Location>
  • 15. Enable webd av # a2enmod ssl dav_svn dav_fs # mkdir /var/lib/webdav # chown -R www-data.www-data /var/lib/webdav Alias /webdav/ /var/lib/webdav/ <Location /webdav> Specify a real path DAV On AuthBasicProvider file AuthType Basic AuthUserFile htpasswd AuthName "WebDAV" require valid-user Options +Indexes DirectoryIndex </Location>
  • 16. Enable webd av # a2enmod ssl dav_svn dav_fs # mkdir /var/lib/webdav # chown -R www-data.www-data /var/lib/webdav Alias /webdav/ /var/lib/webdav/ <Location /webdav> DAV On AuthBasicProvider file Turn DAV on AuthType Basic AuthUserFile htpasswd AuthName "WebDAV" require valid-user Options +Indexes DirectoryIndex </Location>
  • 17. Enable webd av # a2enmod ssl dav_svn dav_fs # mkdir /var/lib/webdav # chown -R www-data.www-data /var/lib/webdav Alias /webdav/ /var/lib/webdav/ <Location /webdav> DAV On AuthBasicProvider file AuthType Basic Season to taste AuthUserFile htpasswd AuthName "WebDAV" require valid-user Options +Indexes DirectoryIndex </Location>
  • 19. TEST webdav Apache httpd Web Browser HTTP filesystem # curl --insecure --user testuser https://sandbox.ascii164.com/webdav/
  • 20. TEST webdav Apache httpd WebDAV Client WebDAV HTTP filesystem # mkdir /mnt/dav # mount -t davfs https://sandbox.ascii164.com/webdav/ /mnt/dav # mount # ls /mnt/dav
  • 21. Subversionn v ersio sub ● Delta-V WebDAV Versioning Extension (RFC3253) ● CollabNet → Apache Software Foundation ● http://subversion.apache.org/
  • 22. RECIPE Subversion 2 svn server using Apache2
  • 23. Dependenciests re dien Ing ● Mandatory ● apache2-mpm-prefork ● libapache2-svn ● subversion ● Optional ● libapache2-mod-dnssd ● libapache2-mod-auth-*
  • 24. Enable SUBV ERSION # mkdir /var/lib/svn # svnadmin create /var/lib/svn/repo # chown -R www-data.www-data /var/lib/svn <Location /svn> DAV svn SVNParentPath /var/lib/svn AuthBasicProvider file AuthType Basic AuthUserFile htpasswd AuthName "Subversion" require valid-user Options +Indexes DirectoryIndex </Location>
  • 25. Enable SUBV ERSION # mkdir /var/lib/svn # svnadmin create /var/lib/svn/repo # chown -R www-data.www-data /var/lib/svn <Location /svn> DAV svn Virtual Path SVNParentPath /var/lib/svn AuthBasicProvider file AuthType Basic AuthUserFile htpasswd AuthName "Subversion" require valid-user Options +Indexes DirectoryIndex </Location>
  • 26. Enable SUBV ERSION # mkdir /var/lib/svn # svnadmin create /var/lib/svn/repo # chown -R www-data.www-data /var/lib/svn <Location /svn> DAV svn SVNParentPath /var/lib/svnFile System svn DAV AuthBasicProvider file AuthType Basic AuthUserFile htpasswd AuthName "Subversion" require valid-user Options +Indexes DirectoryIndex </Location>
  • 27. Enable SUBV ERSION # mkdir /var/lib/svn # svnadmin create /var/lib/svn/repo # chown -R www-data.www-data /var/lib/svn <Location /svn> DAV svn SVNParentPath /var/lib/svn Repo Root AuthBasicProvider file (Use SVNPath AuthType Basic for a single repo) AuthUserFile htpasswd AuthName "Subversion" require valid-user Options +Indexes DirectoryIndex </Location>
  • 29. TES T SUBVERSION SVN Client Delta-V Apache httpd WebDAV HTTP libsvn filesystem # svn mkdir https://sandbox.ascii164.com/svn/repo/trunk/ https://sandbox.ascii164.com/svn/repo/tags/ https://sandbox.ascii164.com/svn/repo/branches/ # svn ls https://sandbox.ascii164.com/svn/repo/
  • 30. TES T SUBVERSION Delta-V Apache httpd WebDAV Web Browser HTTP libsvn filesystem # curl --insecure --user testuser https://sandbox.ascii164.com/svn/repo/
  • 31. v ersi oning vs backup
  • 32. WHEN should I create a new version ?
  • 33. Subversion ipe 3 Rec autoversioning filesystem
  • 34. Enable auto versioning # mkdir /var/lib/svn # svnadmin create /var/lib/svn/documents # chown -R www-data.www-data /var/lib/svn <Location /documents> DAV svn SVNPath /var/lib/svn/documents SVNAutoVersioning on ModMimeUsePathInfo on AuthBasicProvider file AuthType Basic AuthUserFile htpasswd AuthName "Documents" require valid-user Options +Indexes DirectoryIndex </Location>
  • 35. EST autov ersioning T Delta-V Apache httpd WebDAV Client WebDAV HTTP libsvn filesystem # mkdir /mnt/docs # mount -t davfs https://sandbox.ascii164.com/documents/ /mnt/docs # mount # ls /mnt/docs
  • 36. EST autov ersioning T SVN Client Delta-V Apache httpd WebDAV HTTP libsvn filesystem # svn ls https://sandbox.ascii164.com/documents/
  • 37. MORE RESOUR Further ResourcesS CE ● http://svnbook.red-bean.com/
  • 38. CO ME W EL STI ONS Q UE ALL
  • 40. SVN Client Delta-V Apache httpd WebDAV HTTP libsvn filesystem
  • 41. <Location /svn> DAV svn SVNParentPath /var/lib/svn AuthBasicProvider ldap AuthzLDAPAuthoritative off AuthType Basic AuthName "Document Repository" AuthLDAPURL ldap://localhost/ou=Users,dc=company,dc=com?uid?sub? require valid-user </Location>
  • 42. SVN Client Delta-V Apache httpd WebDAV Client WebDAV Web Browser HTTP libsvn filesystem
  • 44. SVN Client Delta-V WebDAV Client WebDAV Apache Web Browser HTTP libsvn filesystem
  • 47. SVN Client Delta-V WebDAV Client WebDAV Apache Web Browser HTTP libsvn filesystem
  • 48. <Location /documents> DAV svn SVNPath /var/lib/svn/docrepo SVNAutoVersioning on ModMimeUsePathInfo on AuthBasicProvider ldap AuthzLDAPAuthoritative off AuthType Basic AuthName "Document Repository" AuthLDAPURL ldap://localhost/ou=Users,dc=company,dc=com?uid?sub? require valid-user </Location>