Overview
- MPD
- a daemon used for playing music stored in a local directory
- fookebox
- python-based web interface serves as a remote control for MPD
- uWSGI
this web server is specifically designed for the uWSGI protocol
Setup
aptitude install mpd fookebox uwsgi uwsgi-plugin-http uwsgi-plugin-python
MPD
configure music_directory in /etc/mpd.conf
restart mpd: invoke-rc.d mpd
fookebox
configure music_base_path in /etc/fookebox/config.ini
uWSGI
create the service file in /etc/uwsgi/apps-available/fookebox.ini:
[uwsgi] http = :8000 file = /etc/fookebox/fookebox.wsgi static-map = /javascript=/usr/share/javascript workers = 5
BEWARE: the above definition of static-map is important - otherwise common javascript files (e.g. prototyp/prototype.js) are not found. This would render the web interface unusable.
enable the uWSGI service:
ln -s ../apps-available/fookebox.ini /etc/uwsgi/apps-enabled/
restart uWSGI: invoke-rc.d uwsgi
Setup with nginx
aptitude install mpd fookebox uwsgi uwsgi-plugin-python nginx
remove the section location / from /etc/nginx/sites-enabled/default and replace it with the following two sections:
location /javascript { alias /usr/share/javascript; } location / { root html; uwsgi_pass 127.0.0.1:3031; uwsgi_param SCRIPT_NAME /; include uwsgi_params; }
put the following lines into /etc/uwsgi/apps-available/fookebox.ini:
[uwsgi] socket = 127.0.0.1:3031 file = /etc/fookebox/fookebox.wsgi