Get the App
SLTechnology News&Howtos  ›  Servers  › 

New modules added to nginx

Shulou Source: shulou.com Published: 2022-06-03 09:37:24 11月12日 Update

Take the module gunzip as an example to describe how to install a new module in nginx

1. First check which modules have been installed in nginx.

Nginx-V

2. Found that there is no gunzip module, install

Enter the nginx installation directory, not the nginx software directory.

Write the module to be installed in the existing module and execute the following command

. / configure\

-- prefix=/usr/local/ywgh/nginx\

-- http-client-body-temp-path=/tmp/clientbody\

-- http-proxy-temp-path=/tmp/proxy\

-- http-fastcgi-temp-path=/tmp/fastcgi\

-- http-uwsgi-temp-path=/tmp/uwsgi\

-- http-scgi-temp-path=/tmp/scgi\

-- user=www\

-- group=www\

-- with-file-aio\

-- with-http_realip_module\

-- with-http_ssl_module\

-- with-openssl=/usr/local/src/software/nginx/openssl\

-- with-http_gunzip_module\

-- with-http_gzip_static_module\

-- with-zlib=/usr/local/src/software/nginx/zlib\

-- with-http_stub_status_module\

-- with-pcre=/usr/local/src/software/nginx/pcre\

3. Then compile and overwrite

Just make directly, there is no need for make install, if you want to reinstall, use make install, just overwrite it.

Then the newly generated executable nginx is located in the objs directory in the installation directory.

Copy the nginx under the objs directory to the nginx in the software location. Just cover it. When overwriting, you need to close nginx first.

Tags: Modules directories software locations commands files new production time compilation Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Apple Shulou Technology Redmi Microsoft Linux