Hi. I’m new to nginx module development and I’m going to write a module
that must do everything that http_proxy module does except it must do
some checks before request is passed to the upstream. What’s the best
way to do that?
To be more precise I need some functionalty to check request and pass it
to some (formed manually) other url if it passes check procedure and if
the check fails - return 404 back to client.
I’ve tried to start and I faced a ‘segmentation fault’ error. I tried to
add handler to NGX_HTTP_ACCESS_PHASE and that causes segmentation fault.
Here’s the code. Init function is called from merge_loc_conf
function…
I’ve resolved the problem by addind ‘init’ function into
postconfiguration slot of module context.
The next problem is to find out how to get module conf variables from
there
Posted at Nginx Forum:
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.