I want to write the mod_layout.
The idea is: write all chains to temp file, at the end read it, insert the
header after <body> and the footer before </body>.
Sometimes it fails. There is only the header and the footer. Why?
Could you review it?
I'm using the splendid guide to NGINX plugin modules, specifically the
upstream module part at
I'm struggling a bit to understand how a module can indicate which server to
issue a request to - the example proxy module code presumably does this via
the config for the upstream module. If I'm just interested in sending a
query to a known host/port, what's the best way of doing this?
I wondered if I could hijack the upstream module configuration to do it,
since I'm already using that in my nginx.conf, but I've experimented with
trying to get a handle to the upstream module configuration from within my
module and I'm getting null back - so either I'm doing that wrong, or that's
Alternatively I might need to take the code in ngx_http_upstream_init
request and simplify it a bit? Unless any of you know of a simpler starting
Thanks for any help you can offer,
While working on extending nginx' Perl support, I stumbled upon the
If an input handler issues a internal redirect via
ngx_http_internal_redirect(), a call to
ngx_http_get_module_loc_conf(r, ngx_http_X_module) inside an
NGX_HTTP_LOG_PHASE handler returns NULL. If the request is not an
internal redirect, the call returns the expected location config.
Any idea why?
I have been looking through the nginx source code and cannot figure out how
event timers are used (and their purpose). Can somebody shed some light on
this for me please?
Also, I noticed a red/black tree is used somehow with event timers, and I
also do not understand this.