Apache configuration for HLS Webdav publication

    This document describes installation and minimum configuration of Apache on Debian server for HLS Webdav publication.


  1. Install Debian server (tested with Debian-7.7.0-i386 net install)

  2. Install apache2 package

    apt-get install apache2

  3. Enable dav and dav_fs modules

    a2enmod dav

    a2enmod dav_fs

  4. Restart apache service

    /etc/init.d/apache2 restart

  5. Create publication folder

    mkdir /var/www/hls

    chown www-data:www-data /var/www/hls/

  6. Create DAV lock database

    mkdir /var/lock/DAVLock

    touch /var/lock/DAVLock/DAVLock

    chown -R www-data:www-data /var/lock/DAVLock/

  7. Configure server authentication settings
  8. Configure MIME types.
    Edit /etc/apache2/sites-available/default file and add following settings:

    vi /etc/apache2/sites-available/default

    <VirtualHost *:80>
        ServerAdmin webmaster@localhost
    
        DocumentRoot /var/www/hls
        DavLockDB /var/lock/DAVLock/DAVLock
        
        AddType application/x-mpegURL m3u8
        AddType video/MP2T ts
        AddType audio/aac aac
        AddType audio/ac3 ac3
        AddType audio/ec3 ec3
        AddType audio/mpeg mp2
    
        <Directory />
            ...
        </Directory>
    
        ErrorLog ${APACHE_LOG_DIR}/error.log
        LogLevel warn
        CustomLog ${APACHE_LOG_DIR}/access.log combined
    </VirtualHost>
    
  9. Restart apache service

    /etc/init.d/apache2 restart

  10. Play HLS stream from http://yourWebdavServerIP/test/playlist.m3u8