Feb 08 2008

Stream your music with musicindex

Published by Jon at 10:46 pm under Linux

One thing I wanted to do is to be able to access my music library at home from anywhere. I also wanted it to be streamed so I do not have to download the files before I can play them.

Well, the apache module musicindex makes it very simple if you already have an apache web server running. All you need to do is to tell it where your music files are located and it will create a very friendly web interface that will let you browse, search, download and most importantly stream your music files.

Screenshot - Musicindex

Here are the instructions under Debian etch.

First, install the apache module musicindex:

# apt-get install libapache2-mod-musicindex

Then enable the module in apache:

# cd /etc/apache2/mods-enabled/
# ln -s ../mods-available/musicindex.load

Then, open /etc/apache2/httpd.conf with your favorite text editor and add the following. Note that I created a new subdomain (mymusic.mydomain.com) for that purpose only:

<VirtualHost *:80>
ServerName mymusic.mydomain.com
DocumentRoot /path/to/mymusic.mydomain.com
</VirtualHost>
<Directory "
/path/to/mymusic.mydomain.com">
Options Indexes MultiViews FollowSymlinks
AllowOverride Indexes
# Can be overriden in .htaccess
MusicIndex On +Stream +Download +Search -Rss -Tarball
MusicSortOrder album disc track artist title length bitrate freq filetype filename uri
MusicFields track title artist length bitrate freq filetype
# MusicPageTitle Myname
MusicDefaultCss musicindex.css
# Can only be set in apache configuration
MusicDefaultDisplay HTML
MusicIndexCache file://tmp/musicindex
# MusicIceServer [ice.domain.my]:8000
# MusicCookieLife 300
# MusicDirPerLine 3
</Directory>

Then, restart apache:

# /etc/init.d/apache2 stop
# /etc/init.d/apache2 start

You are done. Just open any browser to your new site (mymusic.mydomain.com) and stream your music on demand from anywhere. Enjoy!

No responses yet

Leave a Reply