};
};
+ services.ympd = mypkgs.ympd.config // { enable = true; };
+
# FIXME: open_basedir
services.phpfpm = {
extraConfig = ''
documentRoot = null;
extraConfig = builtins.concatStringsSep "\n" [
mypkgs.adminer.apache.vhostConf
+ mypkgs.ympd.apache.vhostConf
];
})
{ # Should go last, default fallback
'';
};
};
+
+ ympd = rec {
+ config = {
+ webPort = "localhost:18001";
+ mpd = {
+ host = "malige.home.immae.eu";
+ port = 6600;
+ };
+ };
+ apache = {
+ vhostConf = ''
+ <LocationMatch "^/mpd">
+ Use LDAPConnect
+ Require ldap-group cn=users,cn=mpd,ou=services,dc=immae,dc=eu
+ Require local
+ </LocationMatch>
+
+ RedirectMatch permanent "^/mpd$" "/mpd/"
+ <Location "/mpd/">
+ ProxyPass http://${config.webPort}/
+ ProxyPassReverse http://${config.webPort}/
+ ProxyPreserveHost on
+ </Location>
+ <Location "/mpd/ws">
+ ProxyPass ws://${config.webPort}/ws
+ </Location>
+ '';
+ };
+ };
in
{
inherit adminer;
+ inherit ympd;
}