1from unit.applications.proto import TestApplicationProto
2
3
4class TestApplicationPHP(TestApplicationProto):
5 application_type = "php"
6
7 def load(self, script, name='index.php', **kwargs):
7 def load(self, script, index='index.php', **kwargs):
8 script_path = self.current_dir + '/php/' + script
9
10 self._load_conf(
11 {
12 "listeners": {"*:7080": {"pass": "applications/" + script}},
13 "applications": {
14 script: {
15 "type": self.application_type,
16 "processes": {"spare": 0},
17 "root": script_path,
18 "working_directory": script_path,
19 "index": name,
19 "index": index,
20 }
21 },
22 },
23 **kwargs
24 )