Get the App
SLTechnology News&Howtos  ›  Servers  › 

The method of hiding version Information in nginx

Shulou Source: shulou.com Published: 2022-06-03 03:36:51 09月22日 Update

Introduction to Nginx

Nginx (engine x) is a high-performance HTTP and reverse proxy server, as well as an IMAP/POP3/SMTP server. It distributes the source code as a BSD-like license and is known for its stability, rich feature set, sample configuration files, and low consumption of system resources. Nginx is a lightweight Web server / reverse proxy server and email (IMAP/POP3) proxy server, and is distributed under a BSD-like protocol. Its characteristic is that it occupies less memory and has strong concurrency ability. in fact, the concurrency ability of nginx does perform well in the same type of web server.

1. After our daily custom installation of nginx, we can see the version information and server of nginx by visiting the 404 page back to the page that does not exist.

2. In fact, the information of this version can be hidden. Here is a detailed description:

1. The directory in the extracted file is as follows: / root/nginx-1.14.2/src/core-- there is a file called nginx.h.

You can clearly see the specific information and server type of the version.

Hide version information by modifying this file (after modification)

3. The results are as follows:

3. This is the end.

Tags: Server service information version file agent type capability page clear middle table fact fact memory function form effect source code feature electronic Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Xiaomi Linux NVidia MariaDB MySQL