Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Nginx-1.16.1 installation

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

First, download the source code on the official website

Http://nginx.org/en/download.html

Upload to the specified installation directory

Tar vxf nginx-1.16.1.tar.gz

Cd cd nginx-1.16.1 & &. / config-- prefix=/etc/nginx

. / configure: error: the HTTP rewrite module requires the PCRE library.

You can either disable the module by using-without-http_rewrite_module

Option, or install the PCRE library into the system, or build the PCRE library

Statically from the source with nginx by using-- with-pcre= option.

Install the required plug-ins

Yum-y install openssl openssl-devel

Checking for zlib library... Not found

. / configure: error: the HTTP gzip module requires the zlib library.

You can either disable the module by using-without-http_gzip_module

Option, or install the zlib library into the system, or build the zlib library

Statically from the source with nginx by using-- with-zlib= option.

Install the required plug-ins

Yum install zlib-devel-y

. / configure-- prefix=/usr/local/nginx

Make

3. Start nginx

. / sbin/nginx

4. View the details of nginx startup configuration

. / sbin/nginx-t

Hide the nginx version number

Vim conf/nginx.conf

Add server_tokens off under the http server path

Vim conf/fastcgi.conf modifies fastcgi_param SERVER_SOFTWARE nginx/$nginx_version; fastcgi_param SERVER_SOFTWARE nginx; restart or reload nginx pkill nginx &. / sbin/nginx

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report