current position:Home>5.Nginx_ Third party module echo

5.Nginx_ Third party module echo

2021-08-25 09:53:48 Little monster 55

The third module is right. nginx Functional extension of , Third party modules need to be installed before compilation nginx Use parameters when you're doing this --add-module=PATH Specify the path to add , Some modules are customized and developed by the company's developers according to business needs , Some modules are developed by open source fans and uploaded to github Open source module ,nginx Support third party modules , You need to recompile the source code to support
Open source echo modular , Realize information such as output variables
[[email protected] data]# yum install git -y
[[email protected] data]# cd /usr/local/src
[[email protected] data]# git clone
[[email protected] data]# git clone git://

Compilation and installation Nginx
[[email protected] data]# yum install gcc pcre-devel openssl-devel zlib-devel perl-ExtUtils-Embed -y
[[email protected] data]# useradd -r -s /sbin/nologin nginx
[[email protected] data]# wget
[[email protected] data]# tar xf nginx-1.20.1.tar.gz
[[email protected] data]# cd nginx-1.20.1
[[email protected] data]# ./configure \
--prefix=/apps/nginx \
--user=nginx --group=nginx \
--with-http_ssl_module \
--with-http_v2_module \
--with-http_realip_module \
--with-http_stub_status_module \
--with-http_gzip_static_module \
--with-http_perl_module \
--with-pcre \
--with-stream \
--with-stream_ssl_module \
--with-stream_realip_module \
[[email protected] data]# make && make install
[[email protected] data]# ln -s /apps/nginx/sbin/nginx /usr/sbin
[[email protected] data]# vim /apps/nginx/conf/nginx.conf
location /echo {
                default_type text/html;
                echo hello;
                echo $cookie_sessionid;


copyright notice
author[Little monster 55],Please bring the original link to reprint, thank you.

Random recommended