how to add a module to decode/modify parameter on HTTP request

冠胜 12784453 at qq.com
Tue Apr 29 12:45:34 UTC 2014


Hello,

We are new on Nginx module development. Currently we encounter an issue as below. Could you please help to check? Thanks in advanced.

Scenario:

add a module to decode/modify parameter on HTTP request. Then pass the updated HTTP request to PHP to be handled as normal. 

Question:

How to modify nginx.conf and how to decode/modify HTTP request?



Currently, all examples about nginx module I got are nginx modules handle HTTP request and then provide response to client directly.

nginx.conf

               ...



                location ~ \.php$ {

                                fastcgi_split_path_info ^(.+\.php)(/.+)$;

                                # NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini

               

                                # With php5-cgi alone:

                                fastcgi_pass 127.0.0.1:9000;

                                # With php5-fpm:

                                fastcgi_pass unix:/var/run/php5-fpm.sock;

                                fastcgi_index index.php;

                                include fastcgi_params;

                }
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx-devel/attachments/20140429/83b8be30/attachment.html>


More information about the nginx-devel mailing list