Howto Stream Music with Apache2
In this howto we make Apache2 stream music (MP3, FLAC, Ogg Vorbis and MP4/AAC files) using mod_musicindex.
Inhaltsverzeichnis[Verbergen] |
install the libraries
they're usually available over the package manager of your distribution
- libogg-dev
- libvorbis-dev
- libid3tag0-dev
- libmad0-dev
- libflac-dev
- libapache2-mod-musicindex
add the module to apache
edit the file /etc/apache2/httpd.conf and add this line
LoadModule musicindex_module /usr/lib/apache2/modules/mod_musicindex.so
share the directory
depending on what config-file you use you might edit "/etc/apache2/conf.d/alias"
to stream music from the local directory /home/foo/music you'd add this:
Alias /music /home/foo/music/
<Directory /home/foo/music/>
Options Indexes MultiViews FollowSymlinks
AllowOverride Indexes
MusicLister On
MusicSortOrder album disc track artist title length bitrate freq
MusicFields title artist length bitrate
MusicAllowDownload Off
MusicAllowStream On
MusicAllowSearch On
# MusicRssItems Off
MusicPageTitle home
MusicCssDefault musicindex.css
MusicCachePath /tmp/musicindex
# MusicIceServer [ice.domain.my]:8000
# MusicCookieLife 300
</Directory>
restart apache
as root do
# /etc/init.d/apache2 restart
all done! :D
in this example we'd access the music by browsing to http://localhost/music
simple cosmetics
edit this file: /var/www/musicindex/musicindex.css
find that tag:
table#directories div > a.rss {
font-size: 10pt;
}
and change it to:
table#directories div > a.rss {
font-size: 10pt;
margin-left:200px;
}
you'll have much more overview now because of the space between the directories ; )
further reading
password protection