Simple Streaming Music Server Using Apache musicindex

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...

While there is subsonic and what not for streaming music from your home machine to your work machine. I just came across this no non-sense (free) super easy to setup and use, personal Jukebox tool called musicindex. It is an Apache module so if you are already running Apache then setting this up would not take you more than 5 minutes.

This approach should work for any platform that supports Apache (so practically all). But this tutorial would focus on the setup on Linux machine, especially Ubuntu.

If you haven’t installed Apache yet, do so by running this command:

sudo apt-get install apache

After which you should point your browser to http://localhost to check if the default Apache page saying It Works! is visible. Next, install musicindex module for Apache.

apt-get install libapache2-mod-musicindex

Then enable the module by creating a symbolic link for the same in enabled modules folder

cd /etc/apache2/mods-enabled/

ln -s ../mods-available/musicindex.load

Then, open /etc/apache2/httpd.conf with your favorite text editor, say

gksudo gedit /etc/apache2/httpd.conf

and add the following and save it. You must the change the path denoted in red to point to the root directory of your music collection.

Alias /music “/absolute_path_to/my/music/folder
<Directory “/absolute_path_to/my/music/folder“>
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 Sangeet…
MusicDefaultCss musicindex.css
# Can only be set in apache configuration
MusicDefaultDisplay HTML
MusicIndexCache /tmp/musicindex
# MusicIceServer [ice.domain.my]:8000
# MusicCookieLife 300
MusicDirPerLine 3
</Directory>

Alias /musicindex “/usr/share/mod_musicindex”
<Directory /usr/share/mod_musicindex”>
Order allow,deny
Allow from all
</Directory>

Basically this code above would tell Apache to create two aliases, first one is the alias “/music” pointing to your music collection. So, when you point your browser to http://ip_address_of_server_machine/music it would take you to the main directory of your music collection. musicindex supports streaming of mp3 as well as ogg files. You would also like to keep the Alias for /musicindex as it is to get the default styling for the webpage to work. More configuration options can be found at the readme file for musicindex.

To get the aliases to work you need to restart the Apache2 server first by:

/etc/init.d/apache2 restart

Thats it now you should have your online jukebox ready to serve you music on demand. It even allows you to stream music to your iPhone, iPad etc., however only one song at a time.

Currently it can be accessed by anybody on your network, if you want to have only selective access, then wait for my post on enabling password protection.

 

If you found this useful, please consider leaving a comment or liking us on Facebook or following us on Twitter or subscribing to the RSS feed to have future articles delivered to your feed reader.

You might also like

Access or Stream Windows 7 Multimedia Share to Linux Windows 7 samba...
Subtunes: Itunes like UI for subsonic music player If you like...
Beginning of An Affair Between Ubuntu One & iOS With the launch...
$50: Roku LT Streaming Player Amazon offers...

About the Author

has written 1285 posts on this blog.

Meditating towards his "nerdvana", lifehacker is a teacher by the day and a nerdy blogger by the night. He lives to learn and yearns to learn living.

Write a Comment

Gravatars are small images that can show your personality. You can get your gravatar for free today!

*

Copyright © 2014 Hack Your Life!. All rights reserved.
Proudly powered by WordPress. Developed by Deluxe Themes