{}:
let
ympd = rec {
config = {
webPort = "localhost:18001";
mpd = {
host = "malige.home.immae.eu";
port = 6600;
};
};
apache = {
modules = [
"proxy_wstunnel"
];
vhostConf = ''
Use LDAPConnect
Require ldap-group cn=users,cn=mpd,ou=services,dc=immae,dc=eu
Require local
RedirectMatch permanent "^/mpd$" "/mpd/"
ProxyPass http://${config.webPort}/
ProxyPassReverse http://${config.webPort}/
ProxyPreserveHost on
ProxyPass ws://${config.webPort}/ws
'';
};
};
in
ympd