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

How to modify the Nginx version name to disguise any web server

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)05/31 Report--

This article mainly introduces how to modify the Nginx version name camouflage any web server related knowledge, the content is detailed and easy to understand, the operation is simple and fast, has a certain reference value, I believe that after reading this how to modify the Nginx version name camouflage any web server article will have a harvest, let's take a look.

How to change the default name of nginx can be camouflaged slightly or x

Generally speaking, you can modify three locations, one is nginx.h, the other is ngx_http_header_filter_module.c, and one is ngx_http_special_response.c.

Tip: generally, changes are made before nginx compilation, and need to be recompiled after modification.

The code is as follows:

Scr/core/nginx.conf

# define nginx_version "1.4.7"

# define nginx_ver "nginx/" nginx_version

Change it to: (in fact, the version number can also be changed at will)

The code is as follows:

# define nginx_version "1.4.7"

# define nginx_ver "jdws/" nginx_version

In fact, most of the above changes will take effect!

The code is as follows:

/ src/http/ngx_http_header_filter_module.c (http responseheader)

Static char ngx_http_server_string [] = "server: nginx" crlf

Modified to:

Static char ngx_http_server_string [] = "server: jdws" crlf

/ src/http/ngx_http_special_response.c

Static u_char ngx_http_error_tail [] =

"nginx" crlf

"" crlf

"" crlf

Modified to:

Static u_char ngx_http_error_tail [] =

"jdws" crlf

"" crlf

"" crlf

In addition to changing the version number at will, you can also hide the version number:

Modify nginx.conf

Join in http {}

The code is as follows:

Http {

Server_tokens off

}

You can hide the version number.

Note:

After turning off server_tokens, the configuration of nginx.conf will be invalid. Go back to the configuration we just did in steps 2 and 3.

Unhidden version number:

Hidden version number:

This is the end of the article on "how to modify the name of the Nginx version to disguise any web server". Thank you for reading! I believe that everyone has a certain understanding of the knowledge of "how to modify the name of the Nginx version to disguise any web server". If you want to learn more, you are welcome to follow the industry information channel.

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

Internet Technology

Wechat

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

12
Report