diff options
author | Valentin Bartenev <vbart@nginx.com> | 2020-05-14 13:15:01 +0300 |
---|---|---|
committer | Valentin Bartenev <vbart@nginx.com> | 2020-05-14 13:15:01 +0300 |
commit | 376d758dd72ac27f2bd5bb833ba68f5c9b531880 (patch) | |
tree | a3891a0586669543c35004ccbff3a6deca893903 /src/nxt_http.h | |
parent | 0174c971b5ec0d604e4e9becfa41e0bc31179e57 (diff) | |
download | unit-376d758dd72ac27f2bd5bb833ba68f5c9b531880.tar.gz unit-376d758dd72ac27f2bd5bb833ba68f5c9b531880.tar.bz2 |
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"
},
}
}
}
}
Diffstat (limited to '')
-rw-r--r-- | src/nxt_http.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/nxt_http.h b/src/nxt_http.h index 6f593cd2..68051e69 100644 --- a/src/nxt_http.h +++ b/src/nxt_http.h @@ -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; }; |