温馨提示×

温馨提示×

您好,登录后才能下订单哦!

密码登录×
登录注册×
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》

nginx增加新模块

发布时间:2020-02-29 19:02:36 来源:网络 阅读:390 作者:only玄武 栏目:建站服务器

以gunzip这个模块为例,讲述一下,在nginx中如何安装新的模块
1、首先查看nginx已经安装了哪些模块。
nginx –V
nginx增加新模块
2、发现没有gunzip模块,安装
进入nginx的安装目录中,不是nginx的软件目录。
在已有模块种写上要安装的模块,执行下边的命令
./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、然后编译,覆盖
直接make就行,不需要再make install了,如果要重新安装就使用make install,就直接覆盖了。
nginx增加新模块
然后新产生的可执行文件nginx在安装目录中的objs目录下。
将objs目录下的nginx 复制到软件位置的nginx中。进行覆盖就可以了。覆盖的时候,需要先关闭nginx

向AI问一下细节

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

AI