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  https://github.com/openresty/echo-nginx-module.git
or
[[email protected] data]# git clone git://github.com/openresty/echo-nginx-module.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  http://nginx.org/download/nginx-1.20.1.tar.gz
[[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 \
--add-module=/usr/local/src/echo-nginx-module
[[email protected] data]# make && make install
[[email protected] data]# ln -s /apps/nginx/sbin/nginx /usr/sbin
test
[[email protected] data]# vim /apps/nginx/conf/nginx.conf
location /echo {
                default_type text/html;
                echo hello;
                echo $cookie_sessionid;
        }

watermark,size_14,text_QDUxQ1RP5Y2a5a6i,color_FFFFFF,t_100,g_se,x_10,y_10,shadow_20,type_ZmFuZ3poZW5naGVpdGk=
watermark,size_14,text_QDUxQ1RP5Y2a5a6i,color_FFFFFF,t_100,g_se,x_10,y_10,shadow_20,type_ZmFuZ3poZW5naGVpdGk=

copyright notice
author[Little monster 55],Please bring the original link to reprint, thank you.
https://en.qdmana.com/2021/08/20210825095345442F.html

Random recommended