This is set in src/nxt_php_sapi.c ```C 1373: nxt_php_set_cstr(req, "SERVER_PORT", "80", 2, track_vars_array TSRMLS_CC); ``` Once the patch from https://github.com/nginx/unit/issues/753#issuecomment-1258842715 is committed we will be able to use the _local_port_ member of the _nxt_unit_request_t_ structure. Despite the warming in the PHP [reference guide](https://www.php.net/manual/en/reserved.variables.server.php) we should probably at least try and get it right.