]> git.immae.eu Git - perso/Immae/Config/Nix.git/blame - nixops/modules/websites/tools/tools/ympd.nix
Remove naemon local rule
[perso/Immae/Config/Nix.git] / nixops / modules / websites / tools / tools / ympd.nix
CommitLineData
bfe3c9c9 1{ env }:
940f1834
IB
2let
3 ympd = rec {
4 config = {
bfe3c9c9
IB
5 webPort = "localhost:${env.listenPort}";
6 mpd = env.mpd;
940f1834
IB
7 };
8 apache = {
9 modules = [
10 "proxy_wstunnel"
11 ];
12 vhostConf = ''
13 <LocationMatch "^/mpd">
14 Use LDAPConnect
15 Require ldap-group cn=users,cn=mpd,ou=services,dc=immae,dc=eu
940f1834
IB
16 </LocationMatch>
17
18 RedirectMatch permanent "^/mpd$" "/mpd/"
19 <Location "/mpd/">
20 ProxyPass http://${config.webPort}/
21 ProxyPassReverse http://${config.webPort}/
22 ProxyPreserveHost on
23 </Location>
24 <Location "/mpd/ws">
25 ProxyPass ws://${config.webPort}/ws
26 </Location>
27 '';
28 };
29 };
30in
31 ympd