ympd = rec {
config = {
webPort = "localhost:${env.listenPort}";
- mpd = env.mpd;
+ host = env.mpd.host;
+ port = env.mpd.port;
};
apache = {
modules = [
"proxy_wstunnel"
];
vhostConf = ''
- <LocationMatch "^/mpd">
+ <LocationMatch "^/mpd(?!/music.(mp3|ogg))">
Use LDAPConnect
Require ldap-group cn=users,cn=mpd,ou=services,dc=immae,dc=eu
</LocationMatch>
<Location "/mpd/ws">
ProxyPass ws://${config.webPort}/ws
</Location>
+ <Location "/mpd/music.mp3">
+ ProxyPass http://localhost:${env.mp3port}/
+ ProxyPassReverse http://localhost:${env.mp3port}/
+ </Location>
+ <Location "/mpd/music.ogg">
+ ProxyPass http://localhost:${env.oggport}/
+ ProxyPassReverse http://localhost:${env.oggport}/
+ </Location>
'';
};
};