php.py (1303:248eeec4c272) php.py (1381:6c76371a7a75)
1from unit.applications.proto import TestApplicationProto
2
3
4class TestApplicationPHP(TestApplicationProto):
5 application_type = "php"
6
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,
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 )
20 }
21 },
22 },
23 **kwargs
24 )