PHP: implemented "targets" option.
This allows to specify multiple subsequent targets inside PHP applications.
For example:
{
"listeners": {
"*:80": {
"pass": "routes"
}
},
"routes": [
{
"match": {
"uri": "/info"
},
"action": {
"pass": "applications/my_app/phpinfo"
}
},
{
"match": {
"uri": "/hello"
},
"action": {
"pass": "applications/my_app/hello"
}
},
{
"action": {
"pass": "applications/my_app/rest"
}
}
],
"applications": {
"my_app": {
"type": "php",
"targets": {
"phpinfo": {
"script": "phpinfo.php",
"root": "/www/data/admin",
},
"hello": {
"script": "hello.php",
"root": "/www/data/test",
},
"rest": {
"root": "/www/data/example.com",
"index": "index.php"
},
}
}
}
}
This commit is contained in:
@@ -133,8 +133,11 @@ struct nxt_app_s {
|
||||
nxt_nsec_t res_timeout;
|
||||
nxt_msec_t idle_timeout;
|
||||
|
||||
nxt_str_t *targets;
|
||||
|
||||
nxt_app_type_t type:8;
|
||||
|
||||
nxt_mp_t *mem_pool;
|
||||
nxt_queue_link_t link;
|
||||
|
||||
nxt_str_t conf;
|
||||
|
||||
Reference in New Issue
Block a user