-
Notifications
You must be signed in to change notification settings - Fork 26
/
Copy pathtest.nix
36 lines (35 loc) · 970 Bytes
/
test.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
{
name = "apache";
machine.nixcloud.reverse-proxy.enable = true;
machine.nixcloud.reverse-proxy.extendEtcHosts = true;
machine.nixcloud.webservices.apache = {
foo = {
enable = true;
proxyOptions = {
domain = "example.com";
http.mode = "on";
https.mode = "off";
port = 8080;
};
webserver.apache = {
enablePHP = true;
phpOptions = ''
# foo's config....
'';
extraConfig = ''
DocumentRoot "/var/lib/nixcloud/webservices/apache-foo/www/"
<Directory "/var/lib/nixcloud/webservices/apache-foo/www/">
Options FollowSymLinks
AllowOverride None
Require all granted
</Directory>
'';
};
};
};
testScript = ''
$machine->waitForUnit('multi-user.target');
$machine->waitForOpenPort(80);
$machine->succeed('curl http://example.com/index.php | grep -qF HelloWorld');
'';
}