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:
@@ -175,6 +175,7 @@ struct nxt_http_request_s {
|
||||
nxt_http_status_t status:16;
|
||||
|
||||
uint8_t pass_count; /* 8 bits */
|
||||
uint8_t app_target;
|
||||
nxt_http_protocol_t protocol:8; /* 2 bits */
|
||||
uint8_t logged; /* 1 bit */
|
||||
uint8_t header_sent; /* 1 bit */
|
||||
@@ -201,6 +202,7 @@ struct nxt_http_action_s {
|
||||
} u;
|
||||
|
||||
nxt_str_t name;
|
||||
nxt_int_t target;
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user