我只是在Oraclelinux上安装Nginx,并将其作为反向代理使用。
它正在按我的意愿写作。
现在我想添加这个模块:
ngx_http_v2_module
如何做到这一点?配置文件在哪里?
我到处看,他们都说
默认情况下,该模块不是构建的,应该使用--with-http_v2_module配置参数启用。
但我看不到任何如何做到这一点的例子。。。。
当我进入时
/usr/share/nginx/moudles/
我只看到这些文件:
-rw-r--r--. 1 root root 65 Mar 30 2018 mod-http-geoip.conf
-rw-r--r--. 1 root root 72 Mar 30 2018 mod-http-image-filter.conf
-rw-r--r--. 1 root root 64 Mar 30 2018 mod-http-perl.conf
-rw-r--r--. 1 root root 71 Mar 30 2018 mod-http-xslt-filter.conf
-rw-r--r--. 1 root root 59 Mar 30 2018 mod-mail.conf
-rw-r--r--. 1 root root 61 Mar 30 2018 mod-stream.conf
那么我需要下载一些东西吗?把它放在这个目录里?
此外有了这个模块,我可以把图片推送给用户吗?这意味着他将访问网站,并在他的网页中看到我的图像\图标?还是我需要另一个模块?
谢谢,
假设这是关于Oracle Linux 7的,Oracle通过两个通道提供nginx:
- Oracle Linux 7的EPEL软件包(ol7_developer_EPEL(
# yum info nginx
Loaded plugins: langpacks, ulninfo
Installed Packages
Name : nginx
Arch : x86_64
Epoch : 1
Version : 1.12.2
Release : 2.el7
Size : 1.5 M
Repo : installed
From repo : ol7_developer_EPEL
Summary : A high performance web server and reverse proxy server
URL : http://nginx.org/
License : BSD
Description : Nginx is a web server and a reverse proxy server for HTTP, SMTP, POP3 and
: IMAP protocols, with a strong focus on high concurrency, performance and low
: memory usage.
并使用http2模块进行编译:
# /usr/sbin/nginx -V 2>&1 | sed -e 's/--with/n /g' | grep http_v2
--with-http_v2_module
- 或者,软件集合库中也有一个版本(ol7_Software_collections(
# yum info rh-nginx114
Loaded plugins: langpacks, ulninfo
Installed Packages
Name : rh-nginx114
Arch : x86_64
Version : 1.14
Release : 6.el7
Size : 0.0
Repo : installed
From repo : ol7_software_collections
Summary : Package that installs rh-nginx114
License : GPLv2+
Description : This is the main package for rh-nginx114 Software Collection.
其中我们还支持http2:
# /opt/rh/rh-nginx114/root/usr/sbin/nginx -V 2>&1 | sed -e 's/--with/n /g' | grep http_v2
--with-http_v2_module
所以基本上,无论你安装了什么版本,都应该包括在内。
对于该模块的配置,您应该查看上游NGINX文档。