Why do I need to write this? A friend asked me how to debug some nginx information. So I thought of this echo module of Chunge.
1. Download the echo module:
Wget -- no-check-certificate https://github.com/openresty/echo-nginx-module/archive/v0.58.zip
2. Copy to a module directory:
Unzip v0.58.zip
Create directory:/usr/local/nginx/module
Cp-r echo-nginx-module-0.58 // usr/local/nginx/module
3. Recompile nginx. Note that the echo module must be added to the original module compilation parameters.
I am using nginx 1.6.3
Go to the nginx Source Code Directory,
. /Configure -- prefix =/usr/local/nginx -- user = www -- group = www -- with-http_stub_status_module -- with-http_ssl_module -- with-http_flv_module -- with-http_geoip_module -- with-http_gzip_static_module -- add-Moule =/usr/local/nginx // module/echo-nginx-module-0.58/
Compile:
Make-j2
######### Do not make install. ########
At this point, nginx is compiled under the source code sbin,
4. Last step:
Mv/usr/local/nginx/sbin/nginx/usr/local/nginx/sbin/nginx_bak
Mv objs/nginx/usr/local/nginx/sbin/
Kill-USR2 'cat/var/run/nginx. Pi'
Kill-QUIT 'cat/var/run/nginx. pid. Oldbin'