Making external http calls from nginx module

Sergey Brester serg.brester at
Tue Aug 4 15:17:19 UTC 2015



You can try to use `ngx_http_subrequest` (don't know how good it works
for not an nginx location (or named location)). 

For example see some module used that (ex.:

You can also try to use a board directive `post_action` using pure
nginx-config solution, without writing own module - adding it to your
location should call external service specified within (but if I'm not
mistaken still unsupported/undocumented feature). 


04.08.2015 16:34, wrote sunil mallya: 

> Hey folks, 
> Can someone point a code snippet on how I could make a http call to an external service within my module. I believe I should be able to reuse some of the code in ngx_proxy but unclear about the pitfalls. 
> Muchos Gracias, 
> Sunil Mallya
> @sunilmallya 
> _______________________________________________
> nginx-devel mailing list
> nginx-devel at
> [1]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the nginx-devel mailing list