<div dir="ltr">Hello,<div><br></div><div>I want to add a custom 'handler', which would update ngx_os_argv[0] on request. It should be like this:</div><div><br></div><div><div>root 18601 0.0 0.0 62272 3812 ? Ss 07:00 0:00 nginx: master process /opt/nginx/bin/nginx -c /opt/nginx/etc/nginx.conf</div>
<div>web 18602 0.0 0.0 70372 7904 ? S 07:00 0:00 \_ 183.54.68.10 [<a href="http://test.domain.com">test.domain.com</a>] GET /ok.php HTTP/1.1??Host</div><div><br></div><div>It works if using only nginx for static content, but if having proxy_pass in location directive it doesn't work. </div>
<div><br></div><div>Code snippet is like this:</div><div><br></div><div>{</div><div>...</div><div> sprintf(title, "%s [%s] %s", r->connection->addr_text.data, r->headers_in.server.data, r->request_line.data);<br>
</div><div> memcpy(ngx_os_argv[0], title, MAXBUF);<br></div><div> return NGX_DECLINED;</div><div>}</div><div><br></div><div>Question is, how to solve this problem to update ngx_os_argv[0] if using together with proxy_pass? Seems it bypass my 'handler' if using proxy_pass. Maybe there is some kind of sequence of loading modules?</div>
<div><br></div>-- <br>Donatas<br>
</div></div>