]>
Commit | Line | Data |
---|---|---|
bfe3c9c9 | 1 | { env }: |
940f1834 IB |
2 | let |
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 | |
16 | Require local | |
17 | </LocationMatch> | |
18 | ||
19 | RedirectMatch permanent "^/mpd$" "/mpd/" | |
20 | <Location "/mpd/"> | |
21 | ProxyPass http://${config.webPort}/ | |
22 | ProxyPassReverse http://${config.webPort}/ | |
23 | ProxyPreserveHost on | |
24 | </Location> | |
25 | <Location "/mpd/ws"> | |
26 | ProxyPass ws://${config.webPort}/ws | |
27 | </Location> | |
28 | ''; | |
29 | }; | |
30 | }; | |
31 | in | |
32 | ympd |