Nginx hidden version number, Nginx hidden software name

Source: Internet
Author: User

Nginx as a very powerful Web application server and we can use it to do based on the application layer of load balancing has been recognized by the masses, with the problem also reflected, a lot of friends want to have a very good hidden, want to hide version, even want to hide the software name, So today, let's take a look at how these two things are hidden!

For example, we can easily know what the other party is using the server, of course, if you respect open source, leaving a name is also good, if you want to change, there is no problem!

650) this.width=650; "src=" Http://www.pualinux.com/zb_users/upload/2016/01/201601211453363888387741.png "alt=" Response header Information "border=" 0 "vspace=" 0 "style=" border:0px;vertical-align:middle;margin:5px 0px;height:214px;width:374px; "/ >

Tip: If you install with the Yum version, you can't hide the name of our software, but the version number can be hidden!

Hide Nginx Version number

[Email protected] ~]# curl-i http://www.pualinux.com

Bash

http/1.1 Okserver:nginx/1.8.0date:thu, 07:26:37 gmtcontent-type:text/html; Charset=utf-8connection:keep-alivevary:accept-encodingx-cache:hit

If you want to hide the minor version number, which is the 1.8.0 version number, just add the following inside the HTTP tag of the configuration file:

Bash

http{... server_tokens off;..}.

[[email protected] ~]# curl-i http://www.pualinux.com//view again

Bash

http/1.1 OKServer:nginxDate:Thu, 07:26:37 gmtcontent-type:text/html; Charset=utf-8connection:keep-alivevary:accept-encodingx-cache:hit

The version number is gone.

Hide the software name and version number in the form of source code

If you like the hidden Nginx and version number, you can compile the source code at the time of the source modification, and then compile, so that down to achieve the hidden effect

[Email protected] ~]# Cd/usr/local/src/nginx-1.8.0/src/core
[Email protected] nginx-1.8.0]# vim nginx.h

Bash

#define Nginx_version "1.8.0" to the desired version number such as 1000.11.1#define nginx_ver "nginx/" nginx_version to modify the NGINX to the name of the software you want to modify, such as PPU.

Then continue with your compilation installation process, this process and your compilation before the installation of the previous method is not any different, and finally started successfully after

[Email protected] ~]# curl-i http://www.pualinux.com

Bash

http/1.1 Okserver:ppu/1000.11.1date:thu, 07:26:37 gmtcontent-type:text/html; Charset=utf-8connection:keep-alivevary:accept-encodingx-cache:hit

So that we can achieve a hidden effect.


This article from "one step carefully break the red Dust" blog, please be sure to keep this source http://lorne.blog.51cto.com/9062483/1776045

Nginx hidden version number, Nginx hidden software name

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.