Results 1 to 8 of 8

Thread: HOWTO: latest mod_musicindex and apache2

Threaded View

  1. #1
    Join Date
    Sep 2005
    Beans
    113

    HOWTO: latest mod_musicindex and apache2

    This applies to most versions of ubuntu. If there are issues with older versions, let me know.
    (This is from scratch)

    First off, install apache2 and its headers
    sudo apt-get install apache2 apache2-threaded-dev

    install needed headers for audio support
    sudo apt-get install libmad0-dev libid3tag0-dev libogg-dev libvorbis-dev libflac-dev libarchive-dev

    get latest mod_musicindex source (as of this howto it is 1.2.5)
    wget http://www.parisc-linux.org/~varenet...x-1.2.5.tar.gz

    tar xvf mod_musicindex-1.2.5.tar.gz
    cd mod_musicindex-1.2.5
    sudo ./configure
    sudo make install

    sudo pico /etc/apache2/httpd.conf
    and add the following line then close/save
    LoadModule musicindex_module /usr/lib/apache2/modules/mod_musicindex.so

    some files need to be accessible under "/musicindex" on the webserver and the README says you can add an alias in apache to do this, but its never worked for me so i do this method instead. Just remember you need to do this whenever you upgrade the module in case somethings changed

    #remove older version if you have one, first.
    sudo rm -rf /var/www/musicindex

    sudo cp -R /usr/local/share/mod_musicindex /var/www/musicindex

    sudo pico /etc/apache2/sites-enabled/000-default
    scroll to the bottom and find </VirtualHost> and copy and paste these lines starting directly above it, save and close

    Alias /music "/home/duffydack/music"
    <Directory "/home/duffydack/music">
    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 title artist album length bitrate
    MusicPageTitle MusicPage
    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>


    Obviously replace /home/duffydack/music to where-ever your music is.

    Next, its advisable to change the port apache2 is using.
    sudo pico /etc/apache2/ports.conf
    change 80 to something else, 77 for example. Save and close

    sudo /etc/init.d/apache2 restart
    now try it out. http://localhost/music/
    or if you changed the port ie: http://localhost:77/music/

    Password protecting your site
    ------------------------------

    sudo htpasswd2 -c /etc/apache2/passwords duffydack
    of course change "duffydack" to something you want.
    enter a password when prompted

    sudo pico /etc/apache2/sites-enabled/000-default
    at the top with the /var/www directives, you want it to look like this

    DocumentRoot /var/www
    <Directory />
    Options FollowSymLinks
    AllowOverride AuthConfig
    AuthType Basic
    AuthName "Restricted Access"
    AuthUserFile /etc/apache2/passwords
    Require user duffydack
    </Directory>


    sudo /etc/init.d/apache2 restart
    and test it.
    Last edited by duffydack; November 6th, 2009 at 11:57 PM. Reason: updated for latest musicindex and changes to config.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •